shahriar@island.COM (Shahriar Vaghar) (02/22/91)
/*
* MPW C 3.2b1
* System 6.05
* Mac IIfx
* cc -mc68881 foo.c -o foo.c.o
*/
main()
{
printf("(int)(100 * 0.3) = %d\n", (int)(100 * 0.3));
{
double d = 100 * 0.3;
printf("(int)d = %d\n", (int)d);
}
}
/*
output:
(int)(100 * 0.3) = 29 !!!!????
(int)d = 30
printf("(int)(100 * 0.3) = %d\n", || double d = 100 * 0.3;
(int)(100 * 0.3)); || printf("(int)d = %d\n", (int)d);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FMOVE.B #$64,FP0 || FMOVE.B #$64,FP0
FMUL.X *+$0058,FP0 !! || FMUL.X *+$0036,FP0 !!
FINTRZ FP0,FP1 || FMOVE.D FP0,-$0008(A6) ??
FMOVE.L FP1,-$000C(A6) || FMOVE.D -$0008(A6),FP0 ??
MOVE.L -$000C(A6),-(A7) || FINTRZ FP0,FP1
PEA %?Name || FMOVE.L FP1,-$0010(A6)
JSR printf || MOVE.L -$0010(A6),-(A7)
|| PEA %?Name
|| JSR printf
*/