Download Latest Version q-56.tar.gz (234.4 kB)
Email in envelope

Get an email when there's a new version of q

Home / Q_27
Name Modified Size InfoDownloads / 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

Source: README.md, updated 2015-01-01