mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
add new aversin and acoversin builtin functions.
Added new aversin(x, [,eps]) for inverse versed sine and acoversin(x, [,eps]) for inverse coversed sine. Improved trig function help files to reference use of complex arguments that while supported were not documented. Removed old Makefile testing rules for make dbx and make gdb. Improved "make run" to execute calccalc using shared libraries from the local directory, and with reading of the startup scripts disabled. Changed "make prep" to perform various tests that are used to help verify that calc is ready for a release. Added Makefile testing rule testfuncsort to check for the sort of the builtin function list. Changed the order that builtin functions are listed by "show builtin" and the help/builtin to match the sorting of "LANG=C LC_ALL=C sort -d -u".
This commit is contained in:
@@ -3507,7 +3507,7 @@ define test_trig()
|
||||
tnum = test3400(1, 3401);
|
||||
vrfy(tnum++ == 3407, '3407: tnum == 3407');
|
||||
|
||||
/* test versed sine */
|
||||
/* test versed trigonometric sine */
|
||||
pi = pi(1e-20);
|
||||
vrfy(round(versin(0.2, 1e-10), 10) == 0.0199334222,
|
||||
strcat(str(tnum++),
|
||||
@@ -3533,7 +3533,7 @@ define test_trig()
|
||||
strcat(str(tnum++),
|
||||
': round(versin(2 + 3i, 1e-10), 10) == 5.189625691+9.1092278938i'));
|
||||
|
||||
/* test coversed sine */
|
||||
/* test coversed trigonometric sine */
|
||||
pi = pi(1e-20);
|
||||
vrfy(round(coversin(0.2, 1e-10), 10) == 0.8013306692,
|
||||
strcat(str(tnum++),
|
||||
@@ -3559,6 +3559,32 @@ define test_trig()
|
||||
strcat(str(tnum++),
|
||||
': round(coversin(2 + 3i, 1e-10), 10) == -8.1544991469+4.16890696i'));
|
||||
|
||||
/* test inverse versed trigonometric sine */
|
||||
vrfy(round(aversin(0.5, 1e-10), 10) == 1.0471975512,
|
||||
strcat(str(tnum++),
|
||||
': round(aversin(0.5, 1e-10), 10) == 1.0471975512'));
|
||||
vrfy(aversin(0) == 0,
|
||||
strcat(str(tnum++), ': aversin(0) == 0'));
|
||||
vrfy(round(aversin(-5, 1e-10), 10) == 0.1673829554+2.4921599676i,
|
||||
strcat(str(tnum++),
|
||||
': round(aversin(0.5, 1e-10), 10) == 0.1673829554+2.4921599676i'));
|
||||
vrfy(round(aversin(2 + 3i, 1e-10), 10) == 1.8783999763+1.8641615439i,
|
||||
strcat(str(tnum++),
|
||||
': round(aversin(2 + 3i, 1e-10), 10) == 1.8783999763+1.8641615439i'));
|
||||
|
||||
/* test inverse coversed trigonometric sine */
|
||||
vrfy(round(acoversin(0.5, 1e-10), 10) == 0.5235987756,
|
||||
strcat(str(tnum++),
|
||||
': round(acoversin(0.5, 1e-10), 10) == 0.5235987756'));
|
||||
vrfy(acoversin(1) == 0,
|
||||
strcat(str(tnum++), ': acoversin(1) == 0'));
|
||||
vrfy(round(acoversin(-5, 1e-10), 10) == 1.4034133718-2.4921599681i,
|
||||
strcat(str(tnum++),
|
||||
': round(acoversin(0.5, 1e-10), 10) == 1.4034133718-2.4921599681i'));
|
||||
vrfy(round(acoversin(2 + 3i, 1e-10), 10) == -0.3076036495-1.8641615442i,
|
||||
strcat(str(tnum++),
|
||||
': round(acoversin(2 + 3i, 1e-10), 10) == -0.3076036495-1.8641615442i'));
|
||||
|
||||
print strcat(str(tnum++), ': Ending test_trig');
|
||||
}
|
||||
print '051: parsed test_trig()';
|
||||
|
Reference in New Issue
Block a user