Bug in double precision compare
#include <__cross_studio_io.h>
void
main(void)
{
double ad,bd;
debug_printf("hello world\n");
ad=1.0;bd=1.0;
if (ad>=bd) {
debug_printf ("OK1\n");
} else {
debug_printf ("Bad1\n");
}
ad=0.0;bd=0.0;
if (ad>=bd) {
debug_printf ("OK0\n");
} else {
debug_printf ("Bad0\n");
}
debug_exit(0);
}
Compile with 3.6.3 RAM Debug,optimize none, Target CPU LPC1788, Debug terminal response
hello world
OK1
Bad0
Please sign in to leave a comment.
Comments
0 comments