|
From: pito <pi...@vo...> - 2010-09-03 16:54:28
|
Hi, for experimenters - very quick test for floating point math with elapsed time indication. Requires Leon's float lib, Pito's last floatconstants and stopwatch. To see result uncomment print. Benchmark (run on atmega1284P @25MHz): > measure_doloop_with_operation Elapsed 8996 msec ok > Pito \ Quick test of float marker -quicktestfloat fvariable tmp : measure_doloop_with_operation timer-start 100 0 do _pi _ln2 f* tmp f! tmp f@ _e**pi f/ tmp f! tmp f@ _log3 f+ tmp f! tmp f@ _e f- tmp f! \ print result \ i ." I= " . tmp f@ _1e9 f* f>d ." RESULT= " d. ." <<< precise result = -2147058546.4206755 " cr loop timer-stop ." Elapsed " prnt_elapsed_ms ." msec" ; |