Difference between revisions of "SEGGER Floating-Point Library"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "The SEGGER Floating-Point Library is an essential part of the SEGGER Runtime Library. It is available stand-alone or as part of the SEGGER Runtime Library package, and already...")
 
Line 9: Line 9:
 
These are the detailed results of the IEEE-754 Floating-point Benchmark run on an Arm Cortex-M4 microcontroller (NXP K66FN2M0):
 
These are the detailed results of the IEEE-754 Floating-point Benchmark run on an Arm Cortex-M4 microcontroller (NXP K66FN2M0):
   
IEEE-754 Floating-point Library Benchmarks
+
<nowiki>IEEE-754 Floating-point Library Benchmarks
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.
+
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.
   
Target: Cortex-M
+
Target: Cortex-M
   
sinf() Bits Bits
+
sinf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 21 sin(1e-4)
+
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 21 sin(1e-4)
3A83126F +1.00e-03 3A83126E +1.00e-03 3A83126E +1.00e-03 24.00 0.00 55 sin(1e-3)
+
3A83126F +1.00e-03 3A83126E +1.00e-03 3A83126E +1.00e-03 24.00 0.00 55 sin(1e-3)
3C23D70A +1.00e-02 3C23D657 +1.00e-02 3C23D657 +1.00e-02 24.00 0.00 55 sin(1e-2)
+
3C23D70A +1.00e-02 3C23D657 +1.00e-02 3C23D657 +1.00e-02 24.00 0.00 55 sin(1e-2)
3DCCCCCD +1.00e-01 3DCC7577 +9.98e-02 3DCC7577 +9.98e-02 24.00 0.00 54 sin(1e-1)
+
3DCCCCCD +1.00e-01 3DCC7577 +9.98e-02 3DCC7577 +9.98e-02 24.00 0.00 54 sin(1e-1)
3F800000 +1.00e+00 3F576AA4 +8.41e-01 3F576AA4 +8.41e-01 24.00 0.00 139 sin(1)
+
3F800000 +1.00e+00 3F576AA4 +8.41e-01 3F576AA4 +8.41e-01 24.00 0.00 139 sin(1)
3FBC7F84 +1.47e+00 3F7EC48E +9.95e-01 3F7EC48E +9.95e-01 24.00 0.00 138 sin(1.47264147)
+
3FBC7F84 +1.47e+00 3F7EC48E +9.95e-01 3F7EC48E +9.95e-01 24.00 0.00 138 sin(1.47264147)
3FC90FAD +1.57e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 138 sin(1.57079089)
+
3FC90FAD +1.57e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 138 sin(1.57079089)
40490FAC +3.14e+00 373A8886 +1.11e-05 373A8886 +1.11e-05 24.00 0.00 106 sinf(3.14158154)
+
40490FAC +3.14e+00 373A8886 +1.11e-05 373A8886 +1.11e-05 24.00 0.00 106 sinf(3.14158154)
421C4B56 +3.91e+01 3F7B14E5 +9.81e-01 3F7B14E5 +9.81e-01 24.00 0.00 148 sin(39.0735703)
+
421C4B56 +3.91e+01 3F7B14E5 +9.81e-01 3F7B14E5 +9.81e-01 24.00 0.00 148 sin(39.0735703)
43B18000 +3.55e+02 B7FCDE82 -3.01e-05 B7FCDE82 -3.01e-05 24.00 0.00 152 sin(355)
+
43B18000 +3.55e+02 B7FCDE82 -3.01e-05 B7FCDE82 -3.01e-05 24.00 0.00 152 sin(355)
49800036 +1.05e+06 3F384A92 +7.20e-01 3F384A92 +7.20e-01 24.00 0.00 176 sin(1048582.75)
+
49800036 +1.05e+06 3F384A92 +7.20e-01 3F384A92 +7.20e-01 24.00 0.00 176 sin(1048582.75)
489965E8 +3.14e+05 BC7BA1B2 -1.54e-02 BC7BA1B2 -1.54e-02 24.00 0.00 151 sin(100000*Pi)
+
489965E8 +3.14e+05 BC7BA1B2 -1.54e-02 BC7BA1B2 -1.54e-02 24.00 0.00 151 sin(100000*Pi)
501502F9 +1.00e+10 BEF99A64 -4.88e-01 BEF99A64 -4.88e-01 24.00 0.00 187 sin(1e10)
+
501502F9 +1.00e+10 BEF99A64 -4.88e-01 BEF99A64 -4.88e-01 24.00 0.00 187 sin(1e10)
7E967699 +1.00e+38 3F7D39E2 +9.89e-01 3F7D39E2 +9.89e-01 24.00 0.00 186 sin(1e38)
+
7E967699 +1.00e+38 3F7D39E2 +9.89e-01 3F7D39E2 +9.89e-01 24.00 0.00 186 sin(1e38)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
336.00 0.00 1706 Total
+
336.00 0.00 1706 Total
   
cosf() Bits Bits
+
cosf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 3 cos(1e-4)
+
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 3 cos(1e-4)
3A83126F +1.00e-03 3F7FFFF8 +1.00e+00 3F7FFFF8 +1.00e+00 24.00 0.00 48 cos(1e-3)
+
3A83126F +1.00e-03 3F7FFFF8 +1.00e+00 3F7FFFF8 +1.00e+00 24.00 0.00 48 cos(1e-3)
3C23D70A +1.00e-02 3F7FFCB9 +1.00e+00 3F7FFCB9 +1.00e+00 24.00 0.00 48 cos(1e-2)
+
3C23D70A +1.00e-02 3F7FFCB9 +1.00e+00 3F7FFCB9 +1.00e+00 24.00 0.00 48 cos(1e-2)
3DCCCCCD +1.00e-01 3F7EB898 +9.95e-01 3F7EB898 +9.95e-01 24.00 0.00 48 cos(1e-1)
+
3DCCCCCD +1.00e-01 3F7EB898 +9.95e-01 3F7EB898 +9.95e-01 24.00 0.00 48 cos(1e-1)
3F800000 +1.00e+00 3F0A5140 +5.40e-01 3F0A5140 +5.40e-01 24.00 0.00 136 cos(1)
+
3F800000 +1.00e+00 3F0A5140 +5.40e-01 3F0A5140 +5.40e-01 24.00 0.00 136 cos(1)
3FBC7F84 +1.47e+00 3DC8B2D2 +9.80e-02 3DC8B2D2 +9.80e-02 24.00 0.00 103 cos(1.47264147)
+
3FBC7F84 +1.47e+00 3DC8B2D2 +9.80e-02 3DC8B2D2 +9.80e-02 24.00 0.00 103 cos(1.47264147)
3FC90FE7 +1.57e+00 B5C5DDE9 -1.47e-06 B5C5DDE9 -1.47e-06 24.00 0.00 103 cos(1.57079780)
+
3FC90FE7 +1.57e+00 B5C5DDE9 -1.47e-06 B5C5DDE9 -1.47e-06 24.00 0.00 103 cos(1.57079780)
40C90FE6 +6.28e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 136 cos(6.28319073)
+
40C90FE6 +6.28e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 136 cos(6.28319073)
43B18000 +3.55e+02 BF800000 -1.00e+00 BF800000 -1.00e+00 24.00 0.00 180 cos(355)
+
43B18000 +3.55e+02 BF800000 -1.00e+00 BF800000 -1.00e+00 24.00 0.00 180 cos(355)
489965E8 +3.14e+05 3F7FF845 +1.00e+00 3F7FF845 +1.00e+00 24.00 0.00 180 cos(100000*Pi)
+
489965E8 +3.14e+05 3F7FF845 +1.00e+00 3F7FF845 +1.00e+00 24.00 0.00 180 cos(100000*Pi)
501502F9 +1.00e+10 3F5F84C5 +8.73e-01 3F5F84C5 +8.73e-01 24.00 0.00 183 cos(1e10)
+
501502F9 +1.00e+10 3F5F84C5 +8.73e-01 3F5F84C5 +8.73e-01 24.00 0.00 183 cos(1e10)
7E967699 +1.00e+38 3E1655CD +1.47e-01 3E1655CD +1.47e-01 24.00 0.00 182 cos(1e38)
+
7E967699 +1.00e+38 3E1655CD +1.47e-01 3E1655CD +1.47e-01 24.00 0.00 182 cos(1e38)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
288.00 0.00 1350 Total
+
288.00 0.00 1350 Total
   
tanf() Bits Bits
+
tanf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 25 tan(1e-4)
+
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 25 tan(1e-4)
3A83126F +1.00e-03 3A831272 +1.00e-03 3A831272 +1.00e-03 24.00 0.00 74 tan(1e-3)
+
3A83126F +1.00e-03 3A831272 +1.00e-03 3A831272 +1.00e-03 24.00 0.00 74 tan(1e-3)
3C23D70A +1.00e-02 3C23D870 +1.00e-02 3C23D870 +1.00e-02 24.00 0.00 74 tan(1e-2)
+
3C23D70A +1.00e-02 3C23D870 +1.00e-02 3C23D870 +1.00e-02 24.00 0.00 74 tan(1e-2)
3DCCCCCD +1.00e-01 3DCD7C44 +1.00e-01 3DCD7C44 +1.00e-01 24.00 0.00 73 tan(1e-1)
+
3DCCCCCD +1.00e-01 3DCD7C44 +1.00e-01 3DCD7C44 +1.00e-01 24.00 0.00 73 tan(1e-1)
3F800000 +1.00e+00 3FC75923 +1.56e+00 3FC75923 +1.56e+00 24.00 0.00 258 tan(1)
+
3F800000 +1.00e+00 3FC75923 +1.56e+00 3FC75923 +1.56e+00 24.00 0.00 258 tan(1)
40CEAB45 +6.46e+00 3E35493C +1.77e-01 3E35493C +1.77e-01 24.00 0.00 258 tan(6.45840693)
+
40CEAB45 +6.46e+00 3E35493C +1.77e-01 3E35493C +1.77e-01 24.00 0.00 258 tan(6.45840693)
43B18000 +3.55e+02 37FCDE82 +3.01e-05 37FCDE82 +3.01e-05 24.00 0.00 282 tan(355)
+
43B18000 +3.55e+02 37FCDE82 +3.01e-05 37FCDE82 +3.01e-05 24.00 0.00 282 tan(355)
489965E8 +3.14e+05 BC7BA94B -1.54e-02 BC7BA94B -1.54e-02 24.00 0.00 273 tan(100000*Pi)
+
489965E8 +3.14e+05 BC7BA94B -1.54e-02 BC7BA94B -1.54e-02 24.00 0.00 273 tan(100000*Pi)
501502F9 +1.00e+10 BF0EF000 -5.58e-01 BF0EF000 -5.58e-01 24.00 0.00 304 tan(1e10)
+
501502F9 +1.00e+10 BF0EF000 -5.58e-01 BF0EF000 -5.58e-01 24.00 0.00 304 tan(1e10)
7E967699 +1.00e+38 40D79AC2 +6.74e+00 40D79AC2 +6.74e+00 24.00 0.00 321 tan(1e38)
+
7E967699 +1.00e+38 40D79AC2 +6.74e+00 40D79AC2 +6.74e+00 24.00 0.00 321 tan(1e38)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
240.00 0.00 1942 Total
+
240.00 0.00 1942 Total
   
expf() Bits Bits
+
expf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
00000000 +0.00e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 3 expf(0)
+
00000000 +0.00e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 3 expf(0)
3727C5AC +1.00e-05 3F800054 +1.00e+00 3F800054 +1.00e+00 24.00 0.00 44 expf(1e-5)
+
3727C5AC +1.00e-05 3F800054 +1.00e+00 3F800054 +1.00e+00 24.00 0.00 44 expf(1e-5)
38D1B717 +1.00e-04 3F800347 +1.00e+00 3F800347 +1.00e+00 24.00 0.00 44 expf(1e-4)
+
38D1B717 +1.00e-04 3F800347 +1.00e+00 3F800347 +1.00e+00 24.00 0.00 44 expf(1e-4)
3951B717 +2.00e-04 3F80068E +1.00e+00 3F80068E +1.00e+00 24.00 0.00 44 expf(2e-4)
+
3951B717 +2.00e-04 3F80068E +1.00e+00 3F80068E +1.00e+00 24.00 0.00 44 expf(2e-4)
39D1B717 +4.00e-04 3F800D1C +1.00e+00 3F800D1C +1.00e+00 24.00 0.00 43 expf(4e-4)
+
39D1B717 +4.00e-04 3F800D1C +1.00e+00 3F800D1C +1.00e+00 24.00 0.00 43 expf(4e-4)
39EBEDFA +4.50e-04 3F800EC0 +1.00e+00 3F800EC0 +1.00e+00 24.00 0.00 44 expf(4.5e-4)
+
39EBEDFA +4.50e-04 3F800EC0 +1.00e+00 3F800EC0 +1.00e+00 24.00 0.00 44 expf(4.5e-4)
3A83126F +1.00e-03 3F8020C9 +1.00e+00 3F8020C9 +1.00e+00 24.00 0.00 44 expf(1e-3)
+
3A83126F +1.00e-03 3F8020C9 +1.00e+00 3F8020C9 +1.00e+00 24.00 0.00 44 expf(1e-3)
3E80A138 +2.51e-01 3FA48EBB +1.29e+00 3FA48EBB +1.29e+00 24.00 0.00 81 expf(0.25123)
+
3E80A138 +2.51e-01 3FA48EBB +1.29e+00 3FA48EBB +1.29e+00 24.00 0.00 81 expf(0.25123)
3F0D1D69 +5.51e-01 3FDE2123 +1.74e+00 3FDE2123 +1.74e+00 24.00 0.00 80 expf(0.55123)
+
3F0D1D69 +5.51e-01 3FDE2123 +1.74e+00 3FDE2123 +1.74e+00 24.00 0.00 80 expf(0.55123)
4101999A +8.10e+00 454DE782 +3.29e+03 454DE782 +3.29e+03 24.00 0.00 81 expf(8.1)
+
4101999A +8.10e+00 454DE782 +3.29e+03 454DE782 +3.29e+03 24.00 0.00 81 expf(8.1)
4180CCCD +1.61e+01 4B15DA03 +9.82e+06 4B15DA03 +9.82e+06 24.00 0.00 81 expf(16.1)
+
4180CCCD +1.61e+01 4B15DA03 +9.82e+06 4B15DA03 +9.82e+06 24.00 0.00 81 expf(16.1)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
264.00 0.00 589 Total
+
264.00 0.00 589 Total
   
logf() Bits Bits
+
logf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3727C5AC +1.00e-05 C13834F1 -1.15e+01 C13834F1 -1.15e+01 24.00 0.00 158 logf(1e-5)
+
3727C5AC +1.00e-05 C13834F1 -1.15e+01 C13834F1 -1.15e+01 24.00 0.00 158 logf(1e-5)
44800000 +1.02e+03 40DDCE9E +6.93e+00 40DDCE9E +6.93e+00 24.00 0.00 100 logf(1024)
+
44800000 +1.02e+03 40DDCE9E +6.93e+00 40DDCE9E +6.93e+00 24.00 0.00 100 logf(1024)
45828A00 +4.18e+03 41056606 +8.34e+00 41056606 +8.34e+00 24.00 0.00 140 logf(4177.25)
+
45828A00 +4.18e+03 41056606 +8.34e+00 41056606 +8.34e+00 24.00 0.00 140 logf(4177.25)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
72.00 0.00 398 Total
+
72.00 0.00 398 Total
   
sinhf() Bits Bits
+
sinhf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3727C5AC +1.00e-05 3727C5AC +1.00e-05 3727C5AC +1.00e-05 24.00 0.00 22 sinhf(1e-5)
+
3727C5AC +1.00e-05 3727C5AC +1.00e-05 3727C5AC +1.00e-05 24.00 0.00 22 sinhf(1e-5)
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 23 sinhf(1e-4)
+
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 23 sinhf(1e-4)
3951B717 +2.00e-04 3951B717 +2.00e-04 3951B717 +2.00e-04 24.00 0.00 23 sinhf(2e-4)
+
3951B717 +2.00e-04 3951B717 +2.00e-04 3951B717 +2.00e-04 24.00 0.00 23 sinhf(2e-4)
39D1B717 +4.00e-04 39D1B717 +4.00e-04 39D1B717 +4.00e-04 24.00 0.00 60 sinhf(4e-4)
+
39D1B717 +4.00e-04 39D1B717 +4.00e-04 39D1B717 +4.00e-04 24.00 0.00 60 sinhf(4e-4)
39EBEDFA +4.50e-04 39EBEDFB +4.50e-04 39EBEDFB +4.50e-04 24.00 0.00 59 sinhf(4.5e-4)
+
39EBEDFA +4.50e-04 39EBEDFB +4.50e-04 39EBEDFB +4.50e-04 24.00 0.00 59 sinhf(4.5e-4)
3A83126F +1.00e-03 3A831270 +1.00e-03 3A831270 +1.00e-03 24.00 0.00 60 sinhf(1e-3)
+
3A83126F +1.00e-03 3A831270 +1.00e-03 3A831270 +1.00e-03 24.00 0.00 60 sinhf(1e-3)
3E80A138 +2.51e-01 3E81FCB6 +2.54e-01 3E81FCB6 +2.54e-01 24.00 0.00 60 sinhf(0.25123)
+
3E80A138 +2.51e-01 3E81FCB6 +2.54e-01 3E81FCB6 +2.54e-01 24.00 0.00 60 sinhf(0.25123)
3F0D1D69 +5.51e-01 3F145EE3 +5.80e-01 3F145EE3 +5.80e-01 24.00 0.00 119 sinhf(0.55123)
+
3F0D1D69 +5.51e-01 3F145EE3 +5.80e-01 3F145EE3 +5.80e-01 24.00 0.00 119 sinhf(0.55123)
4101999A +8.10e+00 44CDE781 +1.65e+03 44CDE781 +1.65e+03 24.00 0.00 121 sinhf(8.1)
+
4101999A +8.10e+00 44CDE781 +1.65e+03 44CDE781 +1.65e+03 24.00 0.00 121 sinhf(8.1)
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 108 sinhf(16.1)
+
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 108 sinhf(16.1)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
240.00 0.00 655 Total
+
240.00 0.00 655 Total
   
coshf() Bits Bits
+
coshf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3727C5AC +1.00e-05 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 28 coshf(1e-5)
+
3727C5AC +1.00e-05 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 28 coshf(1e-5)
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 28 coshf(1e-4)
+
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 28 coshf(1e-4)
3951B717 +2.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 29 coshf(2e-4)
+
3951B717 +2.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 29 coshf(2e-4)
39D1B717 +4.00e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 48 coshf(4e-4)
+
39D1B717 +4.00e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 48 coshf(4e-4)
39EBEDFA +4.50e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 48 coshf(4.5e-4)
+
39EBEDFA +4.50e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 48 coshf(4.5e-4)
3A83126F +1.00e-03 3F800004 +1.00e+00 3F800004 +1.00e+00 24.00 0.00 47 coshf(1e-3)
+
3A83126F +1.00e-03 3F800004 +1.00e+00 3F800004 +1.00e+00 24.00 0.00 47 coshf(1e-3)
3E80A138 +2.51e-01 3F840F8D +1.03e+00 3F840F8D +1.03e+00 24.00 0.00 48 coshf(0.25123)
+
3E80A138 +2.51e-01 3F840F8D +1.03e+00 3F840F8D +1.03e+00 24.00 0.00 48 coshf(0.25123)
3F0D1D69 +5.51e-01 3F93F1B2 +1.16e+00 3F93F1B2 +1.16e+00 24.00 0.00 111 coshf(0.55123)
+
3F0D1D69 +5.51e-01 3F93F1B2 +1.16e+00 3F93F1B2 +1.16e+00 24.00 0.00 111 coshf(0.55123)
4101999A +8.10e+00 44CDE784 +1.65e+03 44CDE784 +1.65e+03 24.00 0.00 114 coshf(8.1)
+
4101999A +8.10e+00 44CDE784 +1.65e+03 44CDE784 +1.65e+03 24.00 0.00 114 coshf(8.1)
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 100 coshf(16.1)
+
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 100 coshf(16.1)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
240.00 0.00 601 Total
+
240.00 0.00 601 Total
   
tanhf() Bits Bits
+
tanhf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3E800000 +2.50e-01 3E7ACBF5 +2.45e-01 3E7ACBF5 +2.45e-01 24.00 0.00 66 tanhf(0.25)
+
3E800000 +2.50e-01 3E7ACBF5 +2.45e-01 3E7ACBF5 +2.45e-01 24.00 0.00 66 tanhf(0.25)
3F800000 +1.00e+00 3F42F7D6 +7.62e-01 3F42F7D6 +7.62e-01 24.00 0.00 108 tanhf(1)
+
3F800000 +1.00e+00 3F42F7D6 +7.62e-01 3F42F7D6 +7.62e-01 24.00 0.00 108 tanhf(1)
41200000 +1.00e+01 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 18 tanhf(10)
+
41200000 +1.00e+01 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 18 tanhf(10)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
72.00 0.00 192 Total
+
72.00 0.00 192 Total
======= ====== ====== =================
+
======= ====== ====== =================
1752.00 0.00 7433 Grand Total
+
1752.00 0.00 7433 Grand Total
======= ====== ====== =================
+
======= ====== ====== =================</nowiki>
  +
  +
== Basic function performance on RISC-V ==
  +
  +
These are the detailed results of the IEEE-754 Floating-point Benchmark run on a RISC-V RV32IMAC microcontroller (GigaDevice GD32VF103):
  +
  +
<nowiki>IEEE-754 Floating-point Library Benchmarks
  +
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.
  +
  +
Target: RV32IMAC
  +
  +
Function Min Max Avg Description
  +
-------------- ------ ------ ------ -------------------------------
  +
__addsf3 45 60 49.5 Random distribution over (0, 1), operands differ
  +
__subsf3 42 84 62.2 Random distribution over (0, 1), operands differ
  +
__mulsf3 37 57 39.3 Random distribution over (0, 1), operands differ
  +
__divsf3 67 70 67.0 Random distribution over (0, 1), operands differ
  +
__ltsf2 11 15 11.0 Random distribution over (0, 1), operands differ
  +
__lesf2 10 14 10.0 Random distribution over (0, 1), operands differ
  +
__gtsf2 10 17 10.0 Random distribution over (0, 1), operands differ
  +
__gesf2 11 14 11.0 Random distribution over (0, 1), operands differ
  +
__eqsf2 10 13 10.0 Random distribution over (0, 1), operands differ
  +
__nesf2 10 10 10.0 Random distribution over (0, 1), operands differ
  +
__adddf3 52 89 62.8 Random distribution over (0, 1), operands differ
  +
__subdf3 60 123 82.8 Random distribution over (0, 1), operands differ
  +
__muldf3 68 88 75.0 Random distribution over (0, 1), operands differ
  +
__divdf3 192 204 197.2 Random distribution over (0, 1), operands differ
  +
__ltdf2 15 20 16.0 Random distribution over (0, 1), operands differ
  +
__ledf2 15 19 16.0 Random distribution over (0, 1), operands differ
  +
__gtdf2 15 20 16.1 Random distribution over (0, 1), operands differ
  +
__gedf2 15 19 16.1 Random distribution over (0, 1), operands differ
  +
__eqdf2 14 17 14.0 Random distribution over (0, 1), operands differ
  +
__eqdf2 14 14 14.0 Random distribution over (0, 1), operands differ
  +
__fixsfsi 14 14 14.0 Random distribution with magnitudes (1..2^31), signed
  +
__fixunssfsi 13 13 13.0 Random distribution with magnitudes (1..2^31)
  +
__fixsfdi 20 29 23.2 Random distribution with magnitudes (1..2^63), signed
  +
__fixunssfdi 15 23 18.9 Random distribution with magnitudes (1..2^63)
  +
__floatsisf 28 47 32.6 Random distribution with magnitudes (1..2^31), signed
  +
__floatunsisf 28 42 33.0 Random distribution with magnitudes (1..2^31)
  +
__floatdisf 39 66 49.1 Random distribution with magnitudes (1..2^63), signed
  +
__floatundisf 35 58 44.1 Random distribution with magnitudes (1..2^63)
  +
__fixdfsi 9 20 16.8 Random distribution with magnitudes (1..2^31), signed
  +
__fixunsdfsi 9 14 13.8 Random distribution with magnitudes (1..2^31)
  +
__fixdfdi 9 34 26.9 Random distribution with magnitudes (1..2^63), signed
  +
__fixunsdfdi 9 25 21.5 Random distribution with magnitudes (1..2^63)
  +
__floatsidf 28 47 31.6 Random distribution with magnitudes (1..2^31), signed
  +
__floatunsidf 19 32 23.9 Random distribution with magnitudes (1..2^31)
  +
__floatdidf 30 73 45.1 Random distribution with magnitudes (1..2^63), signed
  +
__floatundidf 27 62 39.3 Random distribution with magnitudes (1..2^63)
  +
__extendsfdf2 14 18 14.1 Random distribution with magnitudes (1..2^63), signed
  +
__truncdfsf2 25 36 25.1 Random distribution with magnitudes (1..2^63), signed</nowiki>
   
 
== Explicit Function Performance on RISC-V ==
 
== Explicit Function Performance on RISC-V ==
Line 142: Line 192:
 
These are the detailed results of the IEEE-754 Floating-point Benchmark run on a RISC-V RV32IMAC microcontroller (GigaDevice GD32VF103):
 
These are the detailed results of the IEEE-754 Floating-point Benchmark run on a RISC-V RV32IMAC microcontroller (GigaDevice GD32VF103):
   
IEEE-754 Floating-point Library Benchmarks
+
<nowiki>IEEE-754 Floating-point Library Benchmarks
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.
+
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.
   
Target: RV32IMAC
+
Target: RV32IMAC
   
sinf() Bits Bits
+
sinf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 8 sin(1e-4)
+
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 8 sin(1e-4)
3A83126F +1.00e-03 3A83126E +1.00e-03 3A83126E +1.00e-03 24.00 0.00 70 sin(1e-3)
+
3A83126F +1.00e-03 3A83126E +1.00e-03 3A83126E +1.00e-03 24.00 0.00 70 sin(1e-3)
3C23D70A +1.00e-02 3C23D657 +1.00e-02 3C23D657 +1.00e-02 24.00 0.00 67 sin(1e-2)
+
3C23D70A +1.00e-02 3C23D657 +1.00e-02 3C23D657 +1.00e-02 24.00 0.00 67 sin(1e-2)
3DCCCCCD +1.00e-01 3DCC7577 +9.98e-02 3DCC7577 +9.98e-02 24.00 0.00 67 sin(1e-1)
+
3DCCCCCD +1.00e-01 3DCC7577 +9.98e-02 3DCC7577 +9.98e-02 24.00 0.00 67 sin(1e-1)
3F800000 +1.00e+00 3F576AA4 +8.41e-01 3F576AA4 +8.41e-01 24.00 0.00 182 sin(1)
+
3F800000 +1.00e+00 3F576AA4 +8.41e-01 3F576AA4 +8.41e-01 24.00 0.00 182 sin(1)
3FBC7F84 +1.47e+00 3F7EC48E +9.95e-01 3F7EC48E +9.95e-01 24.00 0.00 193 sin(1.47264147)
+
3FBC7F84 +1.47e+00 3F7EC48E +9.95e-01 3F7EC48E +9.95e-01 24.00 0.00 193 sin(1.47264147)
3FC90FAD +1.57e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 196 sin(1.57079089)
+
3FC90FAD +1.57e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 196 sin(1.57079089)
40490FAC +3.14e+00 373A8886 +1.11e-05 373A8886 +1.11e-05 24.00 0.00 153 sin(3.14158154)
+
40490FAC +3.14e+00 373A8886 +1.11e-05 373A8886 +1.11e-05 24.00 0.00 153 sin(3.14158154)
421C4B56 +3.91e+01 3F7B14E5 +9.81e-01 3F7B14E5 +9.81e-01 24.00 0.00 193 sin(39.0735703)
+
421C4B56 +3.91e+01 3F7B14E5 +9.81e-01 3F7B14E5 +9.81e-01 24.00 0.00 193 sin(39.0735703)
43B18000 +3.55e+02 B7FCDE82 -3.01e-05 B7FCDE82 -3.01e-05 24.00 0.00 219 sin(355)
+
43B18000 +3.55e+02 B7FCDE82 -3.01e-05 B7FCDE82 -3.01e-05 24.00 0.00 219 sin(355)
49800036 +1.05e+06 3F384A92 +7.20e-01 3F384A92 +7.20e-01 24.00 0.00 236 sin(1048582.75)
+
49800036 +1.05e+06 3F384A92 +7.20e-01 3F384A92 +7.20e-01 24.00 0.00 236 sin(1048582.75)
489965E8 +3.14e+05 BC7BA1B2 -1.54e-02 BC7BA1B2 -1.54e-02 24.00 0.00 214 sin(100000*Pi)
+
489965E8 +3.14e+05 BC7BA1B2 -1.54e-02 BC7BA1B2 -1.54e-02 24.00 0.00 214 sin(100000*Pi)
501502F9 +1.00e+10 BEF99A64 -4.88e-01 BEF99A64 -4.88e-01 24.00 0.00 255 sin(1e10)
+
501502F9 +1.00e+10 BEF99A64 -4.88e-01 BEF99A64 -4.88e-01 24.00 0.00 255 sin(1e10)
7E967699 +1.00e+38 3F7D39E2 +9.89e-01 3F7D39E2 +9.89e-01 24.00 0.00 248 sin(1e38)
+
7E967699 +1.00e+38 3F7D39E2 +9.89e-01 3F7D39E2 +9.89e-01 24.00 0.00 248 sin(1e38)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
336.00 0.00 2301 Total
+
336.00 0.00 2301 Total
   
cosf() Bits Bits
+
cosf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 10 cos(1e-4)
+
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 10 cos(1e-4)
3A83126F +1.00e-03 3F7FFFF8 +1.00e+00 3F7FFFF8 +1.00e+00 24.00 0.00 50 cos(1e-3)
+
3A83126F +1.00e-03 3F7FFFF8 +1.00e+00 3F7FFFF8 +1.00e+00 24.00 0.00 50 cos(1e-3)
3C23D70A +1.00e-02 3F7FFCB9 +1.00e+00 3F7FFCB9 +1.00e+00 24.00 0.00 43 cos(1e-2)
+
3C23D70A +1.00e-02 3F7FFCB9 +1.00e+00 3F7FFCB9 +1.00e+00 24.00 0.00 43 cos(1e-2)
3DCCCCCD +1.00e-01 3F7EB898 +9.95e-01 3F7EB898 +9.95e-01 24.00 0.00 43 cos(1e-1)
+
3DCCCCCD +1.00e-01 3F7EB898 +9.95e-01 3F7EB898 +9.95e-01 24.00 0.00 43 cos(1e-1)
3F800000 +1.00e+00 3F0A5140 +5.40e-01 3F0A5140 +5.40e-01 24.00 0.00 186 cos(1)
+
3F800000 +1.00e+00 3F0A5140 +5.40e-01 3F0A5140 +5.40e-01 24.00 0.00 186 cos(1)
3FBC7F84 +1.47e+00 3DC8B2D2 +9.80e-02 3DC8B2D2 +9.80e-02 24.00 0.00 158 cos(1.47264147)
+
3FBC7F84 +1.47e+00 3DC8B2D2 +9.80e-02 3DC8B2D2 +9.80e-02 24.00 0.00 158 cos(1.47264147)
3FC90FE7 +1.57e+00 B5C5DDE9 -1.47e-06 B5C5DDE9 -1.47e-06 24.00 0.00 161 cos(1.57079780)
+
3FC90FE7 +1.57e+00 B5C5DDE9 -1.47e-06 B5C5DDE9 -1.47e-06 24.00 0.00 161 cos(1.57079780)
40C90FE6 +6.28e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 190 cos(6.28319073)
+
40C90FE6 +6.28e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 190 cos(6.28319073)
43B18000 +3.55e+02 BF800000 -1.00e+00 BF800000 -1.00e+00 24.00 0.00 252 cos(355)
+
43B18000 +3.55e+02 BF800000 -1.00e+00 BF800000 -1.00e+00 24.00 0.00 252 cos(355)
489965E8 +3.14e+05 3F7FF845 +1.00e+00 3F7FF845 +1.00e+00 24.00 0.00 251 cos(100000*Pi)
+
489965E8 +3.14e+05 3F7FF845 +1.00e+00 3F7FF845 +1.00e+00 24.00 0.00 251 cos(100000*Pi)
501502F9 +1.00e+10 3F5F84C5 +8.73e-01 3F5F84C5 +8.73e-01 24.00 0.00 245 cos(1e10)
+
501502F9 +1.00e+10 3F5F84C5 +8.73e-01 3F5F84C5 +8.73e-01 24.00 0.00 245 cos(1e10)
7E967699 +1.00e+38 3E1655CD +1.47e-01 3E1655CD +1.47e-01 24.00 0.00 257 cos(1e38)
+
7E967699 +1.00e+38 3E1655CD +1.47e-01 3E1655CD +1.47e-01 24.00 0.00 257 cos(1e38)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
288.00 0.00 1846 Total
+
288.00 0.00 1846 Total
   
tanf() Bits Bits
+
tanf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 7 tan(1e-4)
+
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 7 tan(1e-4)
3A83126F +1.00e-03 3A831272 +1.00e-03 3A831272 +1.00e-03 24.00 0.00 92 tan(1e-3)
+
3A83126F +1.00e-03 3A831272 +1.00e-03 3A831272 +1.00e-03 24.00 0.00 92 tan(1e-3)
3C23D70A +1.00e-02 3C23D870 +1.00e-02 3C23D870 +1.00e-02 24.00 0.00 87 tan(1e-2)
+
3C23D70A +1.00e-02 3C23D870 +1.00e-02 3C23D870 +1.00e-02 24.00 0.00 87 tan(1e-2)
3DCCCCCD +1.00e-01 3DCD7C44 +1.00e-01 3DCD7C44 +1.00e-01 24.00 0.00 86 tan(1e-1)
+
3DCCCCCD +1.00e-01 3DCD7C44 +1.00e-01 3DCD7C44 +1.00e-01 24.00 0.00 86 tan(1e-1)
3F800000 +1.00e+00 3FC75923 +1.56e+00 3FC75923 +1.56e+00 24.00 0.00 403 tan(1)
+
3F800000 +1.00e+00 3FC75923 +1.56e+00 3FC75923 +1.56e+00 24.00 0.00 403 tan(1)
40CEAB45 +6.46e+00 3E35493C +1.77e-01 3E35493C +1.77e-01 24.00 0.00 397 tan(6.45840693)
+
40CEAB45 +6.46e+00 3E35493C +1.77e-01 3E35493C +1.77e-01 24.00 0.00 397 tan(6.45840693)
43B18000 +3.55e+02 37FCDE82 +3.01e-05 37FCDE82 +3.01e-05 24.00 0.00 444 tan(355)
+
43B18000 +3.55e+02 37FCDE82 +3.01e-05 37FCDE82 +3.01e-05 24.00 0.00 444 tan(355)
489965E8 +3.14e+05 BC7BA94B -1.54e-02 BC7BA94B -1.54e-02 24.00 0.00 430 tan(100000*Pi)
+
489965E8 +3.14e+05 BC7BA94B -1.54e-02 BC7BA94B -1.54e-02 24.00 0.00 430 tan(100000*Pi)
501502F9 +1.00e+10 BF0EF000 -5.58e-01 BF0EF000 -5.58e-01 24.00 0.00 458 tan(1e10)
+
501502F9 +1.00e+10 BF0EF000 -5.58e-01 BF0EF000 -5.58e-01 24.00 0.00 458 tan(1e10)
7E967699 +1.00e+38 40D79AC2 +6.74e+00 40D79AC2 +6.74e+00 24.00 0.00 483 tan(1e38)
+
7E967699 +1.00e+38 40D79AC2 +6.74e+00 40D79AC2 +6.74e+00 24.00 0.00 483 tan(1e38)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
240.00 0.00 2887 Total
+
240.00 0.00 2887 Total
   
expf() Bits Bits
+
expf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
00000000 +0.00e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 10 expf(0)
+
00000000 +0.00e+00 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 10 expf(0)
3727C5AC +1.00e-05 3F800054 +1.00e+00 3F800054 +1.00e+00 24.00 0.00 45 expf(1e-5)
+
3727C5AC +1.00e-05 3F800054 +1.00e+00 3F800054 +1.00e+00 24.00 0.00 45 expf(1e-5)
38D1B717 +1.00e-04 3F800347 +1.00e+00 3F800347 +1.00e+00 24.00 0.00 41 expf(1e-4)
+
38D1B717 +1.00e-04 3F800347 +1.00e+00 3F800347 +1.00e+00 24.00 0.00 41 expf(1e-4)
3951B717 +2.00e-04 3F80068E +1.00e+00 3F80068E +1.00e+00 24.00 0.00 38 expf(2e-4)
+
3951B717 +2.00e-04 3F80068E +1.00e+00 3F80068E +1.00e+00 24.00 0.00 38 expf(2e-4)
39D1B717 +4.00e-04 3F800D1C +1.00e+00 3F800D1C +1.00e+00 24.00 0.00 38 expf(4e-4)
+
39D1B717 +4.00e-04 3F800D1C +1.00e+00 3F800D1C +1.00e+00 24.00 0.00 38 expf(4e-4)
39EBEDFA +4.50e-04 3F800EC0 +1.00e+00 3F800EC0 +1.00e+00 24.00 0.00 38 expf(4.5e-4)
+
39EBEDFA +4.50e-04 3F800EC0 +1.00e+00 3F800EC0 +1.00e+00 24.00 0.00 38 expf(4.5e-4)
3A83126F +1.00e-03 3F8020C9 +1.00e+00 3F8020C9 +1.00e+00 24.00 0.00 38 expf(1e-3)
+
3A83126F +1.00e-03 3F8020C9 +1.00e+00 3F8020C9 +1.00e+00 24.00 0.00 38 expf(1e-3)
3E80A138 +2.51e-01 3FA48EBB +1.29e+00 3FA48EBB +1.29e+00 24.00 0.00 86 expf(0.25123)
+
3E80A138 +2.51e-01 3FA48EBB +1.29e+00 3FA48EBB +1.29e+00 24.00 0.00 86 expf(0.25123)
3F0D1D69 +5.51e-01 3FDE2123 +1.74e+00 3FDE2123 +1.74e+00 24.00 0.00 89 expf(0.55123)
+
3F0D1D69 +5.51e-01 3FDE2123 +1.74e+00 3FDE2123 +1.74e+00 24.00 0.00 89 expf(0.55123)
4101999A +8.10e+00 454DE782 +3.29e+03 454DE782 +3.29e+03 24.00 0.00 88 expf(8.1)
+
4101999A +8.10e+00 454DE782 +3.29e+03 454DE782 +3.29e+03 24.00 0.00 88 expf(8.1)
4180CCCD +1.61e+01 4B15DA03 +9.82e+06 4B15DA03 +9.82e+06 24.00 0.00 86 expf(16.1)
+
4180CCCD +1.61e+01 4B15DA03 +9.82e+06 4B15DA03 +9.82e+06 24.00 0.00 86 expf(16.1)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
264.00 0.00 597 Total
+
264.00 0.00 597 Total
   
logf() Bits Bits
+
logf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3727C5AC +1.00e-05 C13834F1 -1.15e+01 C13834F1 -1.15e+01 24.00 0.00 265 logf(1e-5)
+
3727C5AC +1.00e-05 C13834F1 -1.15e+01 C13834F1 -1.15e+01 24.00 0.00 265 logf(1e-5)
44800000 +1.02e+03 40DDCE9E +6.93e+00 40DDCE9E +6.93e+00 24.00 0.00 183 logf(1024)
+
44800000 +1.02e+03 40DDCE9E +6.93e+00 40DDCE9E +6.93e+00 24.00 0.00 183 logf(1024)
45828A00 +4.18e+03 41056606 +8.34e+00 41056606 +8.34e+00 24.00 0.00 240 logf(4177.25)
+
45828A00 +4.18e+03 41056606 +8.34e+00 41056606 +8.34e+00 24.00 0.00 240 logf(4177.25)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
72.00 0.00 688 Total
+
72.00 0.00 688 Total
   
sinhf() Bits Bits
+
sinhf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3727C5AC +1.00e-05 3727C5AC +1.00e-05 3727C5AC +1.00e-05 24.00 0.00 14 sinhf(1e-5)
+
3727C5AC +1.00e-05 3727C5AC +1.00e-05 3727C5AC +1.00e-05 24.00 0.00 14 sinhf(1e-5)
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 14 sinhf(1e-4)
+
38D1B717 +1.00e-04 38D1B717 +1.00e-04 38D1B717 +1.00e-04 24.00 0.00 14 sinhf(1e-4)
3951B717 +2.00e-04 3951B717 +2.00e-04 3951B717 +2.00e-04 24.00 0.00 13 sinhf(2e-4)
+
3951B717 +2.00e-04 3951B717 +2.00e-04 3951B717 +2.00e-04 24.00 0.00 13 sinhf(2e-4)
39D1B717 +4.00e-04 39D1B717 +4.00e-04 39D1B717 +4.00e-04 24.00 0.00 67 sinhf(4e-4)
+
39D1B717 +4.00e-04 39D1B717 +4.00e-04 39D1B717 +4.00e-04 24.00 0.00 67 sinhf(4e-4)
39EBEDFA +4.50e-04 39EBEDFB +4.50e-04 39EBEDFB +4.50e-04 24.00 0.00 59 sinhf(4.5e-4)
+
39EBEDFA +4.50e-04 39EBEDFB +4.50e-04 39EBEDFB +4.50e-04 24.00 0.00 59 sinhf(4.5e-4)
3A83126F +1.00e-03 3A831270 +1.00e-03 3A831270 +1.00e-03 24.00 0.00 59 sinhf(1e-3)
+
3A83126F +1.00e-03 3A831270 +1.00e-03 3A831270 +1.00e-03 24.00 0.00 59 sinhf(1e-3)
3E80A138 +2.51e-01 3E81FCB6 +2.54e-01 3E81FCB6 +2.54e-01 24.00 0.00 59 sinhf(0.25123)
+
3E80A138 +2.51e-01 3E81FCB6 +2.54e-01 3E81FCB6 +2.54e-01 24.00 0.00 59 sinhf(0.25123)
3F0D1D69 +5.51e-01 3F145EE3 +5.80e-01 3F145EE3 +5.80e-01 24.00 0.00 137 sinhf(0.55123)
+
3F0D1D69 +5.51e-01 3F145EE3 +5.80e-01 3F145EE3 +5.80e-01 24.00 0.00 137 sinhf(0.55123)
4101999A +8.10e+00 44CDE781 +1.65e+03 44CDE781 +1.65e+03 24.00 0.00 133 sinhf(8.1)
+
4101999A +8.10e+00 44CDE781 +1.65e+03 44CDE781 +1.65e+03 24.00 0.00 133 sinhf(8.1)
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 112 sinhf(16.1)
+
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 112 sinhf(16.1)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
240.00 0.00 667 Total
+
240.00 0.00 667 Total
   
coshf() Bits Bits
+
coshf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3727C5AC +1.00e-05 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 26 coshf(1e-5)
+
3727C5AC +1.00e-05 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 26 coshf(1e-5)
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 24 coshf(1e-4)
+
38D1B717 +1.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 24 coshf(1e-4)
3951B717 +2.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 24 coshf(2e-4)
+
3951B717 +2.00e-04 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 24 coshf(2e-4)
39D1B717 +4.00e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 50 coshf(4e-4)
+
39D1B717 +4.00e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 50 coshf(4e-4)
39EBEDFA +4.50e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 50 coshf(4.5e-4)
+
39EBEDFA +4.50e-04 3F800001 +1.00e+00 3F800001 +1.00e+00 24.00 0.00 50 coshf(4.5e-4)
3A83126F +1.00e-03 3F800004 +1.00e+00 3F800004 +1.00e+00 24.00 0.00 50 coshf(1e-3)
+
3A83126F +1.00e-03 3F800004 +1.00e+00 3F800004 +1.00e+00 24.00 0.00 50 coshf(1e-3)
3E80A138 +2.51e-01 3F840F8D +1.03e+00 3F840F8D +1.03e+00 24.00 0.00 50 coshf(0.25123)
+
3E80A138 +2.51e-01 3F840F8D +1.03e+00 3F840F8D +1.03e+00 24.00 0.00 50 coshf(0.25123)
3F0D1D69 +5.51e-01 3F93F1B2 +1.16e+00 3F93F1B2 +1.16e+00 24.00 0.00 140 coshf(0.55123)
+
3F0D1D69 +5.51e-01 3F93F1B2 +1.16e+00 3F93F1B2 +1.16e+00 24.00 0.00 140 coshf(0.55123)
4101999A +8.10e+00 44CDE784 +1.65e+03 44CDE784 +1.65e+03 24.00 0.00 139 coshf(8.1)
+
4101999A +8.10e+00 44CDE784 +1.65e+03 44CDE784 +1.65e+03 24.00 0.00 139 coshf(8.1)
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 126 coshf(16.1)
+
4180CCCD +1.61e+01 4A95DA03 +4.91e+06 4A95DA03 +4.91e+06 24.00 0.00 126 coshf(16.1)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
240.00 0.00 679 Total
+
240.00 0.00 679 Total
   
tanhf() Bits Bits
+
tanhf() Bits Bits
Input Expected Calculated Right Wrong Cycles Comment
+
Input Expected Calculated Right Wrong Cycles Comment
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
+
--------:--------- --------:--------- --------:--------- ----- ----- ------ -----------------
3E800000 +2.50e-01 3E7ACBF5 +2.45e-01 3E7ACBF5 +2.45e-01 24.00 0.00 89 tanhf(0.25)
+
3E800000 +2.50e-01 3E7ACBF5 +2.45e-01 3E7ACBF5 +2.45e-01 24.00 0.00 89 tanhf(0.25)
3F800000 +1.00e+00 3F42F7D6 +7.62e-01 3F42F7D6 +7.62e-01 24.00 0.00 145 tanhf(1)
+
3F800000 +1.00e+00 3F42F7D6 +7.62e-01 3F42F7D6 +7.62e-01 24.00 0.00 145 tanhf(1)
41200000 +1.00e+01 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 14 tanhf(10)
+
41200000 +1.00e+01 3F800000 +1.00e+00 3F800000 +1.00e+00 24.00 0.00 14 tanhf(10)
------ ------ ------ -----------------
+
------ ------ ------ -----------------
72.00 0.00 248 Total
+
72.00 0.00 248 Total
======= ====== ====== =================
+
======= ====== ====== =================
1752.00 0.00 9913 Grand Total
+
1752.00 0.00 9913 Grand Total
======= ====== ====== =================
+
======= ====== ====== =================</nowiki>

Revision as of 18:25, 31 January 2020

The SEGGER Floating-Point Library is an essential part of the SEGGER Runtime Library. It is available stand-alone or as part of the SEGGER Runtime Library package, and already included in the use of SEGGER Embedded Studio.

The floating-point library contains complete, fully optimized and verified floating point functionality, which is required for devices without an FPU. The floating-point emulator, a crucial part of the floating-point library, of the Arm and RISC-V variants are written in assembly language, optimized either for small code size or increased execution speed. For other processor architectures the library has a portable C implementation.

For more information, refer to https://www.segger.com/products/development-tools/runtime-library/technology/floating-point-library

Explicit Function Performance on Arm

These are the detailed results of the IEEE-754 Floating-point Benchmark run on an Arm Cortex-M4 microcontroller (NXP K66FN2M0):

IEEE-754 Floating-point Library Benchmarks
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.

Target: Cortex-M

sinf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
38D1B717 +1.00e-04  38D1B717 +1.00e-04  38D1B717 +1.00e-04  24.00   0.00      21  sin(1e-4)
3A83126F +1.00e-03  3A83126E +1.00e-03  3A83126E +1.00e-03  24.00   0.00      55  sin(1e-3)
3C23D70A +1.00e-02  3C23D657 +1.00e-02  3C23D657 +1.00e-02  24.00   0.00      55  sin(1e-2)
3DCCCCCD +1.00e-01  3DCC7577 +9.98e-02  3DCC7577 +9.98e-02  24.00   0.00      54  sin(1e-1)
3F800000 +1.00e+00  3F576AA4 +8.41e-01  3F576AA4 +8.41e-01  24.00   0.00     139  sin(1)
3FBC7F84 +1.47e+00  3F7EC48E +9.95e-01  3F7EC48E +9.95e-01  24.00   0.00     138  sin(1.47264147)
3FC90FAD +1.57e+00  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00     138  sin(1.57079089)
40490FAC +3.14e+00  373A8886 +1.11e-05  373A8886 +1.11e-05  24.00   0.00     106  sinf(3.14158154)
421C4B56 +3.91e+01  3F7B14E5 +9.81e-01  3F7B14E5 +9.81e-01  24.00   0.00     148  sin(39.0735703)
43B18000 +3.55e+02  B7FCDE82 -3.01e-05  B7FCDE82 -3.01e-05  24.00   0.00     152  sin(355)
49800036 +1.05e+06  3F384A92 +7.20e-01  3F384A92 +7.20e-01  24.00   0.00     176  sin(1048582.75)
489965E8 +3.14e+05  BC7BA1B2 -1.54e-02  BC7BA1B2 -1.54e-02  24.00   0.00     151  sin(100000*Pi)
501502F9 +1.00e+10  BEF99A64 -4.88e-01  BEF99A64 -4.88e-01  24.00   0.00     187  sin(1e10)
7E967699 +1.00e+38  3F7D39E2 +9.89e-01  3F7D39E2 +9.89e-01  24.00   0.00     186  sin(1e38)
                                                           ------ ------  ------  -----------------
                                                           336.00   0.00    1706  Total

cosf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
38D1B717 +1.00e-04  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00       3  cos(1e-4)
3A83126F +1.00e-03  3F7FFFF8 +1.00e+00  3F7FFFF8 +1.00e+00  24.00   0.00      48  cos(1e-3)
3C23D70A +1.00e-02  3F7FFCB9 +1.00e+00  3F7FFCB9 +1.00e+00  24.00   0.00      48  cos(1e-2)
3DCCCCCD +1.00e-01  3F7EB898 +9.95e-01  3F7EB898 +9.95e-01  24.00   0.00      48  cos(1e-1)
3F800000 +1.00e+00  3F0A5140 +5.40e-01  3F0A5140 +5.40e-01  24.00   0.00     136  cos(1)
3FBC7F84 +1.47e+00  3DC8B2D2 +9.80e-02  3DC8B2D2 +9.80e-02  24.00   0.00     103  cos(1.47264147)
3FC90FE7 +1.57e+00  B5C5DDE9 -1.47e-06  B5C5DDE9 -1.47e-06  24.00   0.00     103  cos(1.57079780)
40C90FE6 +6.28e+00  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00     136  cos(6.28319073)
43B18000 +3.55e+02  BF800000 -1.00e+00  BF800000 -1.00e+00  24.00   0.00     180  cos(355)
489965E8 +3.14e+05  3F7FF845 +1.00e+00  3F7FF845 +1.00e+00  24.00   0.00     180  cos(100000*Pi)
501502F9 +1.00e+10  3F5F84C5 +8.73e-01  3F5F84C5 +8.73e-01  24.00   0.00     183  cos(1e10)
7E967699 +1.00e+38  3E1655CD +1.47e-01  3E1655CD +1.47e-01  24.00   0.00     182  cos(1e38)
                                                           ------ ------  ------  -----------------
                                                           288.00   0.00    1350  Total

tanf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
38D1B717 +1.00e-04  38D1B717 +1.00e-04  38D1B717 +1.00e-04  24.00   0.00      25  tan(1e-4)
3A83126F +1.00e-03  3A831272 +1.00e-03  3A831272 +1.00e-03  24.00   0.00      74  tan(1e-3)
3C23D70A +1.00e-02  3C23D870 +1.00e-02  3C23D870 +1.00e-02  24.00   0.00      74  tan(1e-2)
3DCCCCCD +1.00e-01  3DCD7C44 +1.00e-01  3DCD7C44 +1.00e-01  24.00   0.00      73  tan(1e-1)
3F800000 +1.00e+00  3FC75923 +1.56e+00  3FC75923 +1.56e+00  24.00   0.00     258  tan(1)
40CEAB45 +6.46e+00  3E35493C +1.77e-01  3E35493C +1.77e-01  24.00   0.00     258  tan(6.45840693)
43B18000 +3.55e+02  37FCDE82 +3.01e-05  37FCDE82 +3.01e-05  24.00   0.00     282  tan(355)
489965E8 +3.14e+05  BC7BA94B -1.54e-02  BC7BA94B -1.54e-02  24.00   0.00     273  tan(100000*Pi)
501502F9 +1.00e+10  BF0EF000 -5.58e-01  BF0EF000 -5.58e-01  24.00   0.00     304  tan(1e10)
7E967699 +1.00e+38  40D79AC2 +6.74e+00  40D79AC2 +6.74e+00  24.00   0.00     321  tan(1e38)
                                                           ------ ------  ------  -----------------
                                                           240.00   0.00    1942  Total

expf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
00000000 +0.00e+00  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00       3  expf(0)
3727C5AC +1.00e-05  3F800054 +1.00e+00  3F800054 +1.00e+00  24.00   0.00      44  expf(1e-5)
38D1B717 +1.00e-04  3F800347 +1.00e+00  3F800347 +1.00e+00  24.00   0.00      44  expf(1e-4)
3951B717 +2.00e-04  3F80068E +1.00e+00  3F80068E +1.00e+00  24.00   0.00      44  expf(2e-4)
39D1B717 +4.00e-04  3F800D1C +1.00e+00  3F800D1C +1.00e+00  24.00   0.00      43  expf(4e-4)
39EBEDFA +4.50e-04  3F800EC0 +1.00e+00  3F800EC0 +1.00e+00  24.00   0.00      44  expf(4.5e-4)
3A83126F +1.00e-03  3F8020C9 +1.00e+00  3F8020C9 +1.00e+00  24.00   0.00      44  expf(1e-3)
3E80A138 +2.51e-01  3FA48EBB +1.29e+00  3FA48EBB +1.29e+00  24.00   0.00      81  expf(0.25123)
3F0D1D69 +5.51e-01  3FDE2123 +1.74e+00  3FDE2123 +1.74e+00  24.00   0.00      80  expf(0.55123)
4101999A +8.10e+00  454DE782 +3.29e+03  454DE782 +3.29e+03  24.00   0.00      81  expf(8.1)
4180CCCD +1.61e+01  4B15DA03 +9.82e+06  4B15DA03 +9.82e+06  24.00   0.00      81  expf(16.1)
                                                           ------ ------  ------  -----------------
                                                           264.00   0.00     589  Total

logf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3727C5AC +1.00e-05  C13834F1 -1.15e+01  C13834F1 -1.15e+01  24.00   0.00     158  logf(1e-5)
44800000 +1.02e+03  40DDCE9E +6.93e+00  40DDCE9E +6.93e+00  24.00   0.00     100  logf(1024)
45828A00 +4.18e+03  41056606 +8.34e+00  41056606 +8.34e+00  24.00   0.00     140  logf(4177.25)
                                                           ------ ------  ------  -----------------
                                                            72.00   0.00     398  Total

sinhf()                                                      Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3727C5AC +1.00e-05  3727C5AC +1.00e-05  3727C5AC +1.00e-05  24.00   0.00      22  sinhf(1e-5)
38D1B717 +1.00e-04  38D1B717 +1.00e-04  38D1B717 +1.00e-04  24.00   0.00      23  sinhf(1e-4)
3951B717 +2.00e-04  3951B717 +2.00e-04  3951B717 +2.00e-04  24.00   0.00      23  sinhf(2e-4)
39D1B717 +4.00e-04  39D1B717 +4.00e-04  39D1B717 +4.00e-04  24.00   0.00      60  sinhf(4e-4)
39EBEDFA +4.50e-04  39EBEDFB +4.50e-04  39EBEDFB +4.50e-04  24.00   0.00      59  sinhf(4.5e-4)
3A83126F +1.00e-03  3A831270 +1.00e-03  3A831270 +1.00e-03  24.00   0.00      60  sinhf(1e-3)
3E80A138 +2.51e-01  3E81FCB6 +2.54e-01  3E81FCB6 +2.54e-01  24.00   0.00      60  sinhf(0.25123)
3F0D1D69 +5.51e-01  3F145EE3 +5.80e-01  3F145EE3 +5.80e-01  24.00   0.00     119  sinhf(0.55123)
4101999A +8.10e+00  44CDE781 +1.65e+03  44CDE781 +1.65e+03  24.00   0.00     121  sinhf(8.1)
4180CCCD +1.61e+01  4A95DA03 +4.91e+06  4A95DA03 +4.91e+06  24.00   0.00     108  sinhf(16.1)
                                                           ------ ------  ------  -----------------
                                                           240.00   0.00     655  Total

coshf()                                                      Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3727C5AC +1.00e-05  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      28  coshf(1e-5)
38D1B717 +1.00e-04  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      28  coshf(1e-4)
3951B717 +2.00e-04  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      29  coshf(2e-4)
39D1B717 +4.00e-04  3F800001 +1.00e+00  3F800001 +1.00e+00  24.00   0.00      48  coshf(4e-4)
39EBEDFA +4.50e-04  3F800001 +1.00e+00  3F800001 +1.00e+00  24.00   0.00      48  coshf(4.5e-4)
3A83126F +1.00e-03  3F800004 +1.00e+00  3F800004 +1.00e+00  24.00   0.00      47  coshf(1e-3)
3E80A138 +2.51e-01  3F840F8D +1.03e+00  3F840F8D +1.03e+00  24.00   0.00      48  coshf(0.25123)
3F0D1D69 +5.51e-01  3F93F1B2 +1.16e+00  3F93F1B2 +1.16e+00  24.00   0.00     111  coshf(0.55123)
4101999A +8.10e+00  44CDE784 +1.65e+03  44CDE784 +1.65e+03  24.00   0.00     114  coshf(8.1)
4180CCCD +1.61e+01  4A95DA03 +4.91e+06  4A95DA03 +4.91e+06  24.00   0.00     100  coshf(16.1)
                                                           ------ ------  ------  -----------------
                                                           240.00   0.00     601  Total

tanhf()                                                      Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3E800000 +2.50e-01  3E7ACBF5 +2.45e-01  3E7ACBF5 +2.45e-01  24.00   0.00      66  tanhf(0.25)
3F800000 +1.00e+00  3F42F7D6 +7.62e-01  3F42F7D6 +7.62e-01  24.00   0.00     108  tanhf(1)
41200000 +1.00e+01  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      18  tanhf(10)
                                                           ------ ------  ------  -----------------
                                                            72.00   0.00     192  Total
                                                          ======= ======  ======  =================
                                                          1752.00   0.00    7433  Grand Total
                                                          ======= ======  ======  =================

Basic function performance on RISC-V

These are the detailed results of the IEEE-754 Floating-point Benchmark run on a RISC-V RV32IMAC microcontroller (GigaDevice GD32VF103):

IEEE-754 Floating-point Library Benchmarks
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.

Target: RV32IMAC

Function            Min     Max     Avg    Description
--------------   ------  ------  ------    -------------------------------
__addsf3             45      60    49.5    Random distribution over (0, 1), operands differ
__subsf3             42      84    62.2    Random distribution over (0, 1), operands differ
__mulsf3             37      57    39.3    Random distribution over (0, 1), operands differ
__divsf3             67      70    67.0    Random distribution over (0, 1), operands differ
__ltsf2              11      15    11.0    Random distribution over (0, 1), operands differ
__lesf2              10      14    10.0    Random distribution over (0, 1), operands differ
__gtsf2              10      17    10.0    Random distribution over (0, 1), operands differ
__gesf2              11      14    11.0    Random distribution over (0, 1), operands differ
__eqsf2              10      13    10.0    Random distribution over (0, 1), operands differ
__nesf2              10      10    10.0    Random distribution over (0, 1), operands differ
__adddf3             52      89    62.8    Random distribution over (0, 1), operands differ
__subdf3             60     123    82.8    Random distribution over (0, 1), operands differ
__muldf3             68      88    75.0    Random distribution over (0, 1), operands differ
__divdf3            192     204   197.2    Random distribution over (0, 1), operands differ
__ltdf2              15      20    16.0    Random distribution over (0, 1), operands differ
__ledf2              15      19    16.0    Random distribution over (0, 1), operands differ
__gtdf2              15      20    16.1    Random distribution over (0, 1), operands differ
__gedf2              15      19    16.1    Random distribution over (0, 1), operands differ
__eqdf2              14      17    14.0    Random distribution over (0, 1), operands differ
__eqdf2              14      14    14.0    Random distribution over (0, 1), operands differ
__fixsfsi            14      14    14.0    Random distribution with magnitudes (1..2^31), signed
__fixunssfsi         13      13    13.0    Random distribution with magnitudes (1..2^31)
__fixsfdi            20      29    23.2    Random distribution with magnitudes (1..2^63), signed
__fixunssfdi         15      23    18.9    Random distribution with magnitudes (1..2^63)
__floatsisf          28      47    32.6    Random distribution with magnitudes (1..2^31), signed
__floatunsisf        28      42    33.0    Random distribution with magnitudes (1..2^31)
__floatdisf          39      66    49.1    Random distribution with magnitudes (1..2^63), signed
__floatundisf        35      58    44.1    Random distribution with magnitudes (1..2^63)
__fixdfsi             9      20    16.8    Random distribution with magnitudes (1..2^31), signed
__fixunsdfsi          9      14    13.8    Random distribution with magnitudes (1..2^31)
__fixdfdi             9      34    26.9    Random distribution with magnitudes (1..2^63), signed
__fixunsdfdi          9      25    21.5    Random distribution with magnitudes (1..2^63)
__floatsidf          28      47    31.6    Random distribution with magnitudes (1..2^31), signed
__floatunsidf        19      32    23.9    Random distribution with magnitudes (1..2^31)
__floatdidf          30      73    45.1    Random distribution with magnitudes (1..2^63), signed
__floatundidf        27      62    39.3    Random distribution with magnitudes (1..2^63)
__extendsfdf2        14      18    14.1    Random distribution with magnitudes (1..2^63), signed
__truncdfsf2         25      36    25.1    Random distribution with magnitudes (1..2^63), signed

Explicit Function Performance on RISC-V

These are the detailed results of the IEEE-754 Floating-point Benchmark run on a RISC-V RV32IMAC microcontroller (GigaDevice GD32VF103):

IEEE-754 Floating-point Library Benchmarks
Copyright (c) 2018-2020 SEGGER Microcontroller GmbH.

Target: RV32IMAC

sinf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
38D1B717 +1.00e-04  38D1B717 +1.00e-04  38D1B717 +1.00e-04  24.00   0.00       8  sin(1e-4)
3A83126F +1.00e-03  3A83126E +1.00e-03  3A83126E +1.00e-03  24.00   0.00      70  sin(1e-3)
3C23D70A +1.00e-02  3C23D657 +1.00e-02  3C23D657 +1.00e-02  24.00   0.00      67  sin(1e-2)
3DCCCCCD +1.00e-01  3DCC7577 +9.98e-02  3DCC7577 +9.98e-02  24.00   0.00      67  sin(1e-1)
3F800000 +1.00e+00  3F576AA4 +8.41e-01  3F576AA4 +8.41e-01  24.00   0.00     182  sin(1)
3FBC7F84 +1.47e+00  3F7EC48E +9.95e-01  3F7EC48E +9.95e-01  24.00   0.00     193  sin(1.47264147)
3FC90FAD +1.57e+00  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00     196  sin(1.57079089)
40490FAC +3.14e+00  373A8886 +1.11e-05  373A8886 +1.11e-05  24.00   0.00     153  sin(3.14158154)
421C4B56 +3.91e+01  3F7B14E5 +9.81e-01  3F7B14E5 +9.81e-01  24.00   0.00     193  sin(39.0735703)
43B18000 +3.55e+02  B7FCDE82 -3.01e-05  B7FCDE82 -3.01e-05  24.00   0.00     219  sin(355)
49800036 +1.05e+06  3F384A92 +7.20e-01  3F384A92 +7.20e-01  24.00   0.00     236  sin(1048582.75)
489965E8 +3.14e+05  BC7BA1B2 -1.54e-02  BC7BA1B2 -1.54e-02  24.00   0.00     214  sin(100000*Pi)
501502F9 +1.00e+10  BEF99A64 -4.88e-01  BEF99A64 -4.88e-01  24.00   0.00     255  sin(1e10)
7E967699 +1.00e+38  3F7D39E2 +9.89e-01  3F7D39E2 +9.89e-01  24.00   0.00     248  sin(1e38)
                                                           ------ ------  ------  -----------------
                                                           336.00   0.00    2301  Total

cosf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
38D1B717 +1.00e-04  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      10  cos(1e-4)
3A83126F +1.00e-03  3F7FFFF8 +1.00e+00  3F7FFFF8 +1.00e+00  24.00   0.00      50  cos(1e-3)
3C23D70A +1.00e-02  3F7FFCB9 +1.00e+00  3F7FFCB9 +1.00e+00  24.00   0.00      43  cos(1e-2)
3DCCCCCD +1.00e-01  3F7EB898 +9.95e-01  3F7EB898 +9.95e-01  24.00   0.00      43  cos(1e-1)
3F800000 +1.00e+00  3F0A5140 +5.40e-01  3F0A5140 +5.40e-01  24.00   0.00     186  cos(1)
3FBC7F84 +1.47e+00  3DC8B2D2 +9.80e-02  3DC8B2D2 +9.80e-02  24.00   0.00     158  cos(1.47264147)
3FC90FE7 +1.57e+00  B5C5DDE9 -1.47e-06  B5C5DDE9 -1.47e-06  24.00   0.00     161  cos(1.57079780)
40C90FE6 +6.28e+00  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00     190  cos(6.28319073)
43B18000 +3.55e+02  BF800000 -1.00e+00  BF800000 -1.00e+00  24.00   0.00     252  cos(355)
489965E8 +3.14e+05  3F7FF845 +1.00e+00  3F7FF845 +1.00e+00  24.00   0.00     251  cos(100000*Pi)
501502F9 +1.00e+10  3F5F84C5 +8.73e-01  3F5F84C5 +8.73e-01  24.00   0.00     245  cos(1e10)
7E967699 +1.00e+38  3E1655CD +1.47e-01  3E1655CD +1.47e-01  24.00   0.00     257  cos(1e38)
                                                           ------ ------  ------  -----------------
                                                           288.00   0.00    1846  Total

tanf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
38D1B717 +1.00e-04  38D1B717 +1.00e-04  38D1B717 +1.00e-04  24.00   0.00       7  tan(1e-4)
3A83126F +1.00e-03  3A831272 +1.00e-03  3A831272 +1.00e-03  24.00   0.00      92  tan(1e-3)
3C23D70A +1.00e-02  3C23D870 +1.00e-02  3C23D870 +1.00e-02  24.00   0.00      87  tan(1e-2)
3DCCCCCD +1.00e-01  3DCD7C44 +1.00e-01  3DCD7C44 +1.00e-01  24.00   0.00      86  tan(1e-1)
3F800000 +1.00e+00  3FC75923 +1.56e+00  3FC75923 +1.56e+00  24.00   0.00     403  tan(1)
40CEAB45 +6.46e+00  3E35493C +1.77e-01  3E35493C +1.77e-01  24.00   0.00     397  tan(6.45840693)
43B18000 +3.55e+02  37FCDE82 +3.01e-05  37FCDE82 +3.01e-05  24.00   0.00     444  tan(355)
489965E8 +3.14e+05  BC7BA94B -1.54e-02  BC7BA94B -1.54e-02  24.00   0.00     430  tan(100000*Pi)
501502F9 +1.00e+10  BF0EF000 -5.58e-01  BF0EF000 -5.58e-01  24.00   0.00     458  tan(1e10)
7E967699 +1.00e+38  40D79AC2 +6.74e+00  40D79AC2 +6.74e+00  24.00   0.00     483  tan(1e38)
                                                           ------ ------  ------  -----------------
                                                           240.00   0.00    2887  Total

expf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
00000000 +0.00e+00  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      10  expf(0)
3727C5AC +1.00e-05  3F800054 +1.00e+00  3F800054 +1.00e+00  24.00   0.00      45  expf(1e-5)
38D1B717 +1.00e-04  3F800347 +1.00e+00  3F800347 +1.00e+00  24.00   0.00      41  expf(1e-4)
3951B717 +2.00e-04  3F80068E +1.00e+00  3F80068E +1.00e+00  24.00   0.00      38  expf(2e-4)
39D1B717 +4.00e-04  3F800D1C +1.00e+00  3F800D1C +1.00e+00  24.00   0.00      38  expf(4e-4)
39EBEDFA +4.50e-04  3F800EC0 +1.00e+00  3F800EC0 +1.00e+00  24.00   0.00      38  expf(4.5e-4)
3A83126F +1.00e-03  3F8020C9 +1.00e+00  3F8020C9 +1.00e+00  24.00   0.00      38  expf(1e-3)
3E80A138 +2.51e-01  3FA48EBB +1.29e+00  3FA48EBB +1.29e+00  24.00   0.00      86  expf(0.25123)
3F0D1D69 +5.51e-01  3FDE2123 +1.74e+00  3FDE2123 +1.74e+00  24.00   0.00      89  expf(0.55123)
4101999A +8.10e+00  454DE782 +3.29e+03  454DE782 +3.29e+03  24.00   0.00      88  expf(8.1)
4180CCCD +1.61e+01  4B15DA03 +9.82e+06  4B15DA03 +9.82e+06  24.00   0.00      86  expf(16.1)
                                                           ------ ------  ------  -----------------
                                                           264.00   0.00     597  Total

logf()                                                       Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3727C5AC +1.00e-05  C13834F1 -1.15e+01  C13834F1 -1.15e+01  24.00   0.00     265  logf(1e-5)
44800000 +1.02e+03  40DDCE9E +6.93e+00  40DDCE9E +6.93e+00  24.00   0.00     183  logf(1024)
45828A00 +4.18e+03  41056606 +8.34e+00  41056606 +8.34e+00  24.00   0.00     240  logf(4177.25)
                                                           ------ ------  ------  -----------------
                                                            72.00   0.00     688  Total

sinhf()                                                      Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3727C5AC +1.00e-05  3727C5AC +1.00e-05  3727C5AC +1.00e-05  24.00   0.00      14  sinhf(1e-5)
38D1B717 +1.00e-04  38D1B717 +1.00e-04  38D1B717 +1.00e-04  24.00   0.00      14  sinhf(1e-4)
3951B717 +2.00e-04  3951B717 +2.00e-04  3951B717 +2.00e-04  24.00   0.00      13  sinhf(2e-4)
39D1B717 +4.00e-04  39D1B717 +4.00e-04  39D1B717 +4.00e-04  24.00   0.00      67  sinhf(4e-4)
39EBEDFA +4.50e-04  39EBEDFB +4.50e-04  39EBEDFB +4.50e-04  24.00   0.00      59  sinhf(4.5e-4)
3A83126F +1.00e-03  3A831270 +1.00e-03  3A831270 +1.00e-03  24.00   0.00      59  sinhf(1e-3)
3E80A138 +2.51e-01  3E81FCB6 +2.54e-01  3E81FCB6 +2.54e-01  24.00   0.00      59  sinhf(0.25123)
3F0D1D69 +5.51e-01  3F145EE3 +5.80e-01  3F145EE3 +5.80e-01  24.00   0.00     137  sinhf(0.55123)
4101999A +8.10e+00  44CDE781 +1.65e+03  44CDE781 +1.65e+03  24.00   0.00     133  sinhf(8.1)
4180CCCD +1.61e+01  4A95DA03 +4.91e+06  4A95DA03 +4.91e+06  24.00   0.00     112  sinhf(16.1)
                                                           ------ ------  ------  -----------------
                                                           240.00   0.00     667  Total

coshf()                                                      Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3727C5AC +1.00e-05  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      26  coshf(1e-5)
38D1B717 +1.00e-04  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      24  coshf(1e-4)
3951B717 +2.00e-04  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      24  coshf(2e-4)
39D1B717 +4.00e-04  3F800001 +1.00e+00  3F800001 +1.00e+00  24.00   0.00      50  coshf(4e-4)
39EBEDFA +4.50e-04  3F800001 +1.00e+00  3F800001 +1.00e+00  24.00   0.00      50  coshf(4.5e-4)
3A83126F +1.00e-03  3F800004 +1.00e+00  3F800004 +1.00e+00  24.00   0.00      50  coshf(1e-3)
3E80A138 +2.51e-01  3F840F8D +1.03e+00  3F840F8D +1.03e+00  24.00   0.00      50  coshf(0.25123)
3F0D1D69 +5.51e-01  3F93F1B2 +1.16e+00  3F93F1B2 +1.16e+00  24.00   0.00     140  coshf(0.55123)
4101999A +8.10e+00  44CDE784 +1.65e+03  44CDE784 +1.65e+03  24.00   0.00     139  coshf(8.1)
4180CCCD +1.61e+01  4A95DA03 +4.91e+06  4A95DA03 +4.91e+06  24.00   0.00     126  coshf(16.1)
                                                           ------ ------  ------  -----------------
                                                           240.00   0.00     679  Total

tanhf()                                                      Bits   Bits
             Input            Expected          Calculated  Right  Wrong  Cycles  Comment
--------:---------  --------:---------  --------:---------  -----  -----  ------  -----------------
3E800000 +2.50e-01  3E7ACBF5 +2.45e-01  3E7ACBF5 +2.45e-01  24.00   0.00      89  tanhf(0.25)
3F800000 +1.00e+00  3F42F7D6 +7.62e-01  3F42F7D6 +7.62e-01  24.00   0.00     145  tanhf(1)
41200000 +1.00e+01  3F800000 +1.00e+00  3F800000 +1.00e+00  24.00   0.00      14  tanhf(10)
                                                           ------ ------  ------  -----------------
                                                            72.00   0.00     248  Total
                                                          ======= ======  ======  =================
                                                          1752.00   0.00    9913  Grand Total
                                                          ======= ======  ======  =================