📄 testreport.txt
字号:
<6> ceilf The exception behavor is the same as soft-float version.
<7> floorf The exception behavor is the same as soft-float version.
<8> fabsf The exception behavor is the same as soft-float version.
<9> sqrtf The exceptions sent include inexact results and invalid operations.
The soft-float version sents the same invalid operations and nearly
double inexact results.
<10> fmodf The exception behavor is the same as soft-float version.
<11> pow The exceptions sent are all inexact results. While, soft-float
version sents overflow or underflow exceptions, instead.
<12> log The exception behavor is almost the same as that of soft-float
version. Both of them send division by zero, inexact result, and
invalid operation exceptions. The only difference is one less
invalid operation exception from soft-float version.
<13> log10 The exception behavor is almost the same as that of soft-float
version. Both of them send division by zero, inexact result, and
invalid operation exceptions. The only difference is one less
invalid operation exception from soft-float version.
<14> exp The exception behavor is almost the same as that of soft-float
version. Both of them send inexact result, overflow and underflow
exceptions. The only difference is one more inexact result exceptions
from soft-float version.
<15> sin The exception behavor is the same as soft-float version.
<16> cos The exception behavor is the same as soft-float version.
<17> tan The exception behavor is the same as soft-float version.
<18> asin The exception behavor is the same as soft-float version.
<19> acos The exception behavor is almost the same as that of soft-float
version. Both of them send invalid operation and inexact result
exceptions. The only difference is one more inexact result
exception in soft-float.
<20> atan The exception behavor is the same as soft-float version.
<21> atan2 The exception behavor is the same as soft-float version.
<22> sinh The exception behavor is the same as soft-float version.
<23> cosh The exception behavor is the same as soft-float version.
<24> tanh The exception behavor is almost the same as that of soft-float
version. Both of them send inexact result exceptions only. The
only difference is one more inexact result exceptions from
soft-float version.
<25> _y0 The exceptions sent include division by zero, inexact result and
invalid operation. The difference with soft-float version is that
soft-float sends much more inexact result exceptions.
<26> _y1 The exceptions sent include division by zero, inexact result and
invalid operation. The soft-float version sends one more division
by zero exception, one more invalid operation exception and much
more inexact result exceptions.
<27> _yn The exceptions sent include division by zero and inexact result.
The soft-float version also sends invalid operation exceptions.
And the soft-float version sends more division by zero and much
more inexact result exceptions.
6. Thread Security Test
Thread security test is to verify that functions in crunchlib give correct results
in a multi-task environment that there are more than one task running on the crunch
coprocessor. The test is based on the accuracy test. That is two accruacy tests run
in two independent threads simultaneously. The calculation results are compared with
that of single-thread accuracy test.
The following is the summarized test result of accuracytest.exe, the thread security
test program.
<1> ceil The results of both threads are the same as that of single thread.
<2> floor The results of both threads are the same as that of single thread.
<3> fabs The results of both threads are the same as that of single thread.
<4> sqrt The results of both threads are the same as that of single thread.
<5> fmod The results of both threads are the same as that of single thread.
<6> ceilf The results of both threads are the same as that of single thread.
<7> floorf The results of both threads are the same as that of single thread.
<8> fabsf The results of both threads are the same as that of single thread.
<9> sqrtf The results of both threads are the same as that of single thread.
<10> fmodf The results of both threads are the same as that of single thread.
<11> pow The results of multi-thread is slightly different with that of single
thread. The largest difference still occurs at bit 54. The average
difference occurs at bit 60.10188679. The average difference for single
thread occurs at 60.1171875. That is perhaps because that the test of
pow is based on randomly generated double values.
<12> log The results of both threads are the same as that of single thread.
<13> log10 The results of both threads are the same as that of single thread.
<14> exp The results of both threads are the same as that of single thread.
<15> sin The results of both threads are the same as that of single thread.
<16> cos The results of both threads are the same as that of single thread.
<17> tan The results of both threads are the same as that of single thread.
<18> asin The results of both threads are the same as that of single thread.
<19> acos The results of both threads are the same as that of single thread.
<20> atan The results of both threads are the same as that of single thread.
<21> atan2 The results of both threads are the same as that of single thread.
<22> sinh The results of both threads are the same as that of single thread.
<23> cosh The results of both threads are the same as that of single thread.
<24> tanh The results of both threads are the same as that of single thread.
<25> _y0 The results of both threads are the same as that of single thread.
<26> _y1 The results of both threads are the same as that of single thread.
<27> _yn The results of both threads are the same as that of single thread.
7. Performance Test
Performance test is to verify that functions in crunchlib are improved on speed
compared with their counterparts in Windows CE kernel. To do the test, each
function in crunchlib and its soft-float counterpart run many times. The time
consumed is recorded and percentage of speed improvement is calculated.
The following is the summarized test result of performance.exe, the performance
test program.
crunchlib soft-float improved accerlated repeating
(ms) (ms) by (%) by (times) count
<1> ceil 78 126 35 1.615384615 5210*10
<2> floor 79 121 35.53719008 1.53164557 5210*10
*** <3> fabs 40 35 -14.28571429 0.875 5210*10
<4> sqrt 190 774 72.71448664 4.073684211 5210*10
<5> fmod 405 5928 92.7639807 14.63703704 5210*10
<6> ceilf 51 98 47.52475248 1.921568627 4130*10
<7> floorf 50 105 45.91836735 2.1 4130*10
<8> fabsf 29 40 34.14634146 1.379310345 4130*10
<9> sqrtf 68 616 87.82161235 9.058823529 4130*10
<10> fmodf 84 1660 94.35215947 19.76190476 4130*10
<11> pow 397 2781 84.30913349 7.005037783 5210*10
<12> log 198 1104 81.17195005 5.575757576 5210*10
<13> log10 243 1189 77.43119266 4.893004115 5210*10
<14> exp 109 681 82.64984227 6.247706422 5210*10
<15> sin 515 695 20.52067381 1.349514563 5210*10
<16> cos 523 638 9.532062392 1.219885277 5210*10
<17> tan 606 690 6.288343558 1.138613861 5210*10
<18> asin 124 338 59.74440895 2.725806452 5210*10
<19> acos 124 400 65.58265583 3.225806452 5210*10
<20> atan 152 588 73.92795883 3.868421053 5210*10
<21> atan2 290 775 62.20779221 2.672413793 5210*10
<22> sinh 148 671 77.59643917 4.533783784 5210*10
<23> cosh 197 958 79.62577963 4.862944162 5210*10
<24> tanh 169 552 68.44036697 3.266272189 5210*10
<25> _y0 1159 3688 68.63648685 3.182053494 5210*10
<26> _y1 1145 3750 69.15008069 3.27510917 5210*10
<27> _yn 48439 129410 62.56935322 2.671607589 4130
8. Test Conclusion
The test conclusion can be summarized as bellow.
1> The calcation error between hard-float and soft-float is within a tiny scale,
except that sin, cos, and tan have larger periodical error near zero output.
2> The exceptions sent are similar to those of soft-float.
3> The crunchlib functions are thread secure.
4> All functions, but fabs, are improved in speed. Therefore, fabs will not be
exported.
What prevents the result of hard-float math functions from being exactly the
same as those of soft-float ones is the difference between the algorithms that
crunchlib adopts and Windows CE kernel adopts. However, these difference in
results is understandable and will not bring any ill effect to users' applications.
9. Reference
1>crunchlibspec.txt
Appendices
No
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -