Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
FPU Complete.tar.gz | 2015-01-01 | 176.9 kB | |
FPU Complete.zip | 2015-01-01 | 243.1 kB | |
README.md | 2015-01-01 | 590 Bytes | |
Totals: 3 Items | 420.6 kB | 0 |
At revision 27, Q has an FPU (Floating Point Unit) to complement its ALU (Arithmetic and Logic Unit). I expect to use the FPU for e.g. converting degrees plus decimal minutes (from GPS) to decimal degrees, but have yet to write the macros. The following academic example compares getting the square root of 2 from sqrt() or exp(log() / 2)
fi ^<ZAM>^<RST>
n13000 2
fi ^<PSHF 0>^<DUPF>^<FSQRT>^<POPF 1>^<DUPF>^<FLOG>^<DIVF>^<FEXP>^<POPF 2>n--^J
Output from last line: 13000 2.00000000000000000e+00 2 13001 1.41421356237309515e+00 1.41421 13002 1.41421356237309492e+00 1.41421