Shop OBEX P1 Docs P2 Docs Learn Events
FPU Software Bug — Parallax Forums

FPU Software Bug

Justin ShumakerJustin Shumaker Posts: 22
edited 2005-01-16 09:12 in General Discussion
Using the SOFTWARE version of the FPU class under development there is a bug in the compare function when comparing against the value 0. If you do something like:

Float32 f1 = new Float32();
Float32 f2 = new Float32();

f1.set("0");
f2.set("1");

if(f1.compare(f2) >= 0) {
System.out.println("this is a problem\n");
}

The maintainer might want to check the LoadAB function in the FPU code...
if you do f1.set("0.000001"); then there is no problem. This problem does not occur on the hardware version.

- Justin
Sign In or Register to comment.