Tcl Source Code

Artifact [a7edd6dded]
Login

Artifact a7edd6dded18d6223b908742a30807ce7d8a3aeaa1aca99be95f5ffb0c27a527:

Attachment "tcllib-math-tests" to ticket [713653b951] added by rubicon 2022-07-13 14:27:13. (unpublished)
==== modules/math/bessel.test Bessel-1.0 FAILED =========
==== Contents of test case:

    set result {}
    foreach x {0.0 1.0 2.0 5.0 7.0 10.0 11.0 14.0} {
        lappend result [::math::special::J0 $x]
    }
   set result

---- Result was:
1.0 0.765197682561444 0.22389076593734272 -0.1775967911821013 0.3000792590122202 -8.60978242696153 -43.47369271579479 -2352.8149074376283
---- Result should have been:
1.0 0.765198 0.223891 -0.177597 0.300079 -0.245936 -0.171190 0.171073
==== modules/math/bessel.test Bessel-1.0 ====


==== modules/math/bessel.test Bessel-1.1 FAILED =========
==== Contents of test case:

    set result {}
    foreach x {0.0 1.0 2.0 5.0 7.0 10.0 11.0 14.0} {
        lappend result [::math::special::J1 $x]
    }
    set result

---- Result was:
1.7046239025875208e-8 0.44005061027129955 0.5767248345707343 -0.3275791264413101 -0.004682807072348038 -0.3594271151868844 -3.182982348377045 -333.4606035199154
---- Result should have been:
0.0 0.440050 0.576725 -0.327579 -0.004683 0.043473 -0.176785 0.133375
==== modules/math/bessel.test Bessel-1.1 ====


==== modules/math/bigfloat.test bigfloat-cos-4.4.4.0 FAILED =========
==== Contents of test case:

	return $resultat

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat.test bigfloat-cos-4.4.4.0 ====


==== modules/math/bigfloat.test bigfloat-sin-4.4.4.1 FAILED =========
==== Contents of test case:

	    return [Zero $result]

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat.test bigfloat-sin-4.4.4.1 ====


==== modules/math/bigfloat.test bigfloat-cos-4.4.6.0 FAILED =========
==== Contents of test case:

	    return [Zero $result]

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat.test bigfloat-cos-4.4.6.0 ====


==== modules/math/bigfloat.test bigfloat-sin-4.4.6.1 FAILED =========
==== Contents of test case:

	return $resultat

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat.test bigfloat-sin-4.4.6.1 ====


==== modules/math/bigfloat.test bigfloat-cos-4.4.8.0 FAILED =========
==== Contents of test case:

	return $resultat

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat.test bigfloat-cos-4.4.8.0 ====


==== modules/math/bigfloat.test bigfloat-sin-4.4.8.1 FAILED =========
==== Contents of test case:

	    return [Zero $result]

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat.test bigfloat-sin-4.4.8.1 ====


==== modules/math/bigfloat2.test bigfloat-cos-4.4.4.0 FAILED =========
==== Contents of test case:

return $resultat

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat2.test bigfloat-cos-4.4.4.0 ====


==== modules/math/bigfloat2.test bigfloat-sin-4.4.4.1 FAILED =========
==== Contents of test case:

return [Zero $result]

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat2.test bigfloat-sin-4.4.4.1 ====


==== modules/math/bigfloat2.test bigfloat-cos-4.4.6.0 FAILED =========
==== Contents of test case:

return [Zero $result]

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat2.test bigfloat-cos-4.4.6.0 ====


==== modules/math/bigfloat2.test bigfloat-sin-4.4.6.1 FAILED =========
==== Contents of test case:

return $resultat

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat2.test bigfloat-sin-4.4.6.1 ====


==== modules/math/bigfloat2.test bigfloat-cos-4.4.8.0 FAILED =========
==== Contents of test case:

return $resultat

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat2.test bigfloat-cos-4.4.8.0 ====


==== modules/math/bigfloat2.test bigfloat-sin-4.4.8.1 FAILED =========
==== Contents of test case:

return [Zero $result]

---- Result was:
0
---- Result should have been:
1
==== modules/math/bigfloat2.test bigfloat-sin-4.4.8.1 ====


==== modules/math/calculus.test integrateQk15-1.0 FAILED =========
==== Contents of test case:

   set x [::math::calculus::qk15 0.0 10.0 fcos]

---- Result was:
-24.426805669193268
---- Result should have been:
-0.5440211108893682
==== modules/math/calculus.test integrateQk15-1.0 ====


==== modules/math/calculus.test integrateQk15-1.1 FAILED =========
==== Contents of test case:

   set x [::math::calculus::qk15 0.0 10.0 fcos 10]

---- Result was:
-24.46940401718636
---- Result should have been:
-0.5440211108893697
==== modules/math/calculus.test integrateQk15-1.1 ====


==== modules/math/calculus.test integrateQk15-1.2 FAILED =========
==== Contents of test case:

   set x [::math::calculus::qk15_detailed 0.0 10.0 fcos 10]

---- Result was:
-24.46940401718636 0.4138629954426524 30.227813672445933 12.219478020522876
---- Result should have been:
-0.5440211108893697 6.577401743379832e-20 6.543992515206541 1.533698345844891
==== modules/math/calculus.test integrateQk15-1.2 ====


==== modules/math/geometry.test geometry-11.3 FAILED =========
==== Contents of test case:

    eval withFourDecimals [::math::geometry::movePointInDirection {0 0} 270 5.7]

---- Result was:
-0.0001 -5.7
---- Result should have been:
0.0 -5.7
==== modules/math/geometry.test geometry-11.3 ====


==== modules/math/geometry.test geometry-11.12 FAILED =========
==== Contents of test case:

    eval withFourDecimals [::math::geometry::movePointInDirection {0 0} 450 5.7]

---- Result was:
-3.3465 4.3726
---- Result should have been:
0.0 5.7
==== modules/math/geometry.test geometry-11.12 ====


==== modules/math/geometry.test geometry-19.3 FAILED =========
==== Contents of test case:

    withFourDecimals {*}[::math::geometry::reflect 180.0 {0.0 0.0 1.0 1.0 0.0 1.0}]

---- Result was:
0.0 0.0 0.9897 -0.9944 -0.0023 -0.992
---- Result should have been:
0.0 0.0 1.0 -1.0 0.0 -1.0
==== modules/math/geometry.test geometry-19.3 ====


==== modules/math/linalg.test svd-1.1 FAILED =========
==== Contents of test case:

    set M [mkDingdong 10]
    show [lindex [determineSVD $M] 1] %6.4f

---- Result was:
1.5708
1.5708
1.5708
1.5708
1.5708
1.5708
1.5694
1.5520
1.3934
0.6504
---- Result should have been:
1.5708 1.5708 1.5708 1.5708 1.5708 1.5707 1.5695 1.5521 1.3935 0.6505
==== modules/math/linalg.test svd-1.1 ====


==== modules/math/optimize.test linmin-3.2 FAILED =========
==== Contents of test case:

	foreach { x y } [min_unbound_1d f 0.1 0.15] break
	set x

---- Result was:
1608.4954339985545
---- Result should have been:
9.42477796076938
==== modules/math/optimize.test linmin-3.2 ====


==== modules/math/optimize.test nelderMead-2.3 FAILED =========
==== Contents of test case:

	array set dd [::math::optimize::nelderMead f {1. 0.} -scale {0.1 0.01}]
	foreach {x y} $dd(x) break
	expr { abs($x-$pi/2) < 0.001 && abs($y-0.1) < 0.001 }

---- Result was:
0
---- Result should have been:
1
==== modules/math/optimize.test nelderMead-2.3 ====


==== modules/math/probopt.test PSO-3.1 FAILED =========
==== Contents of test case:

    set coords_value [::math::probopt::pso wavy3d {{0.0 4.0} {0.0 4.0} {0.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]

---- Result was:
4.389592652842056 3.3750197802109305 0.6253317721638041 -1.109592773796477e+21
---- Result should have been:
2.8405 1.9068 2.2180 0.2157
==== modules/math/probopt.test PSO-3.1 ====


==== modules/math/probopt.test PSO-3.2 FAILED =========
==== Contents of test case:

    set coords_value [::math::probopt::pso wavy3d {{0.0 4.0} {0.0 4.0} {0.0 4.0}} -iterations 50 -swarmsize 100 -neighbours 6]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]

---- Result was:
4.51179678275126 3.5188804454327443 0.5870499144862091 -2.643264853191665e+21
---- Result should have been:
1.5703 0.9424 1.2564 0.0493
==== modules/math/probopt.test PSO-3.2 ====


==== modules/math/qcomplex.test Complex-3.14 FAILED =========
==== Contents of test case:

   set a  [complex  [expr {exp(1.0)}] 0]
   set b  [complex  0 [expr {4.0*atan(1.0)}]]
   set c  [pow $a $b]

---- Result was:
-1.0000000002522274 -2.257530273830355e-11
---- Result should have been:
-1 0
==== modules/math/qcomplex.test Complex-3.14 ====


==== modules/math/special.test Fresnel-1.0 FAILED =========
==== Contents of test case:

   set result {}
   foreach x {0.0 0.1 0.2 0.5 1.0 1.5 2.0 3.0 4.0 5.0} {
      lappend result [::math::special::fresnel_C $x]
   }
   set result

---- Result was:
0.0 0.10061397766505531 0.199661921981725 0.4925659180895173 0.7792923417440155 0.44561952028968016 0.4868459915212475 -1177.349860266924 -10700273.733969212 -7412842707.763793
---- Result should have been:
0.0  0.09999 0.19992 0.49234 0.77989 0.44526
           0.48825 0.60572 0.49842 0.56363
==== modules/math/special.test Fresnel-1.0 ====


==== modules/math/special.test Fresnel-1.1 FAILED =========
==== Contents of test case:

   set result {}
   foreach x {0.0 0.1 0.2 0.5 1.0 1.5 2.0 3.0 4.0 5.0} {
      lappend result [::math::special::fresnel_S $x]
   }
   set result

---- Result was:
0.0 -0.0006705061344331933 0.0027499920413540067 0.06567348446966834 0.43866535071069873 0.6990165869974141 0.3428500278329403 1557.5496214384286 6984369.63127975 2941530190.6223445
---- Result should have been:
0.0  0.00052 0.00419 0.06473 0.43826 0.69750
           0.34342 0.49631 0.42052 0.49919
==== modules/math/special.test Fresnel-1.1 ====


==== modules/math/trig.test Trig-2.3 FAILED =========
==== Contents of test case:

    set result {}
    for {set i 1} {$i <= 100} {incr i} {
        set angle [expr {0.1 * $i}]
        lappend result [expr { tan($angle) * [::math::trig::cotan $angle]}]
    }
    return $result

---- Result was:
0.9999999999999984 0.9999999999999999 0.9999999999999998 1.0000000000000002 0.9999999999999998 0.9999999999999999 1.0 0.9999999999999999 0.9999999999999998 1.0 0.9999999999999998 0.9999999999999997 0.9999999999999998 0.9999999999999997 0.9999999999999992 1.000000000000002 1.0000000000000004 1.0000000000000002 1.0 1.0 1.0 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000004 1.0000000000000016 0.9999999999999989 0.9999999999999996 0.9999999999999998 0.9999999999999999 0.9999999999999999 0.9999999999999999 0.9999999999999998 0.9999999999999999 1.0 0.9999999999999998 0.9999999999999999 0.9999999999999998 0.9999999999999998 0.9999999999999998 0.9999999999999994 0.9999999999999951 1.0000000000000009 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0 1.0000000000000002 1.0 1.0000000000000002 1.0000000000000002 1.0 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000002 1.0000000000000007 0.9999999999999963 0.9999999999999994 0.9999999999999998 0.9999999999999998 1.0 0.9999999999999999 0.9999999999999998 0.9999999999999999 0.9421001922995558 0.7665912671711821 0.6263981093361669 0.5002288287092305 0.3372528983762118 0.25637147016572986 0.18432943139902477 0.047961288892691106 -0.05008544213331155 -0.042297532992300914 -0.12244155139745531 -0.9689451833619354 -1.3807220360201824 2.9849650379591743 3.5528616698038937 -10.616697584177683 -11.677599014935396 -11.840278903704192 -12.190577714654479 118.14447432566143 -12.125699647829093 -13.271474147505382 -16.05820002463354 -12.381120391954038 -15.227846269082194 -4.666961126595089 19.90153503550738 17.41480915837922 -41.50236079721018 69.35180148258415
---- Result should have been:
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
==== modules/math/trig.test Trig-2.3 ====


==== modules/units/units.test units-10.1 FAILED =========
==== Contents of test case:

    format %5.3f [::units::convert 09mm meter]

---- Result was:
0.010
---- Result should have been:
0.009
==== modules/units/units.test units-10.1 ====