-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal explicitly with fix(NaN). Factor out unary fpu instructions whos…
…e interrupt / flags are slightly different to the binary instructions. Fixes #35.
- Loading branch information
Sarah Mount
committed
Aug 2, 2016
1 parent
4a7dd90
commit de20c77
Showing
10 changed files
with
233 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Some floating point corner cases. */ | ||
#include <float.h> | ||
#include <stdio.h> | ||
#include <stdint.h> | ||
|
||
int main() { | ||
int val_i = 0xffffffff; | ||
float val_f = 0xffffffff; | ||
float convert_f = (float)val_i; | ||
int convert_i = (int)val_f; | ||
printf("Signed integer value = %d, %x\n", val_i, val_i); | ||
printf("Float value = %.*e\n", DECIMAL_DIG, val_f); | ||
printf("Convert float to signed integer: %d, %x\n", convert_i, convert_i); | ||
printf("Convert signed integer to float = %.*e\n", DECIMAL_DIG, convert_f); | ||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.