From 58eacdb6c6fe2c7298d10b756707958a7bdd3e3a Mon Sep 17 00:00:00 2001 From: Kris Katterjohn Date: Sat, 16 Nov 2024 17:31:03 -0500 Subject: [PATCH] Add translation for plog (using TRANSLATE-WITH-FLONUM-OP) No problems with the test suite, share test suite or rtest_translator. New tests have been added to rtest_translator. --- src/transf.lisp | 1 + tests/rtest_translator.mac | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/transf.lisp b/src/transf.lisp index e5d070475..afef54d44 100644 --- a/src/transf.lisp +++ b/src/transf.lisp @@ -69,4 +69,5 @@ then ACOS(X) will be of mode FLOAT if and only if X is of mode FLOAT.") (def-same%tr %atanh %acos) (def-same%tr %acoth %acos) (def-same%tr %log %acos) +(def-same%tr %plog %acos) (def-same%tr %sqrt %acos) diff --git a/tests/rtest_translator.mac b/tests/rtest_translator.mac index 82d7cfb0e..1334f2e18 100644 --- a/tests/rtest_translator.mac +++ b/tests/rtest_translator.mac @@ -281,7 +281,7 @@ compile_or_lose (faa, gaa, fbb, gbb, fcc, gcc); foo(x) := block (mode_declare (x, float), [tanh (x), tan (x), sech (x), sec (x), acos (x), acot (x), sin (x), acsc (x), asinh (x), acsch (x), cosh (x), coth (x), realpart (x), - asec (x), asin (x), erf (x), log (x), cos (x), cot (x), csc (x), + asec (x), asin (x), erf (x), log (x), plog (x), cos (x), cot (x), csc (x), sinh (x), csch (x), sqrt (x), exp (x), atan2 (11, x), atan2 (x, 2/3)]), 0); 0; @@ -291,25 +291,26 @@ y1a : foo (0.5); 1.047197551196597,1.107148717794091,0.479425538604203, 1.570796326794897-1.316957896924817*%i,.4812118250596035,1.44363547517881, 1.127625965206381,2.163953413738653,0.5,1.316957896924817*%i, - 0.523598775598299,.5204998778130465,-.6931471805599453,.8775825618903728, - 1.830487721712452,2.085829642933488,.5210953054937474,1.919034751334944, - .7071067811865476,1.648721270700128,1.5253730473733196,0.6435011087932844]$ + 0.523598775598299,.5204998778130465,-.6931471805599453,-.6931471805599453, + .8775825618903728,1.830487721712452,2.085829642933488,.5210953054937474, + 1.919034751334944,.7071067811865476,1.648721270700128,1.5253730473733196, + 0.6435011087932844]$ y1b : foo (1.5); [.9051482536448664,14.10141994717172,.4250960349422805,14.1368329029699, .9624236501192069*%i,.5880026035475675,.9974949866040544,.7297276562269662, 1.194763217287109,.6251451172504168,2.352409615243247,1.104791392982512,1.5, .8410686705679303,1.570796326794897-.9624236501192069*%i,.9661051464753108, - .4054651081081644,0.0707372016677029,.07091484430265245,1.002511304246725, - 2.129279455094817,.4696424405952246,1.224744871391589,4.481689070338065, - 1.4352686128093959,1.1525719972156676]$ + .4054651081081644,.4054651081081644,0.0707372016677029,.07091484430265245, + 1.002511304246725,2.129279455094817,.4696424405952246,1.224744871391589, + 4.481689070338065,1.4352686128093959,1.1525719972156676]$ y1c : foo (1.0); [0.7615941559557649,1.557407724654902,0.6480542736638855, 1.850815717680925,0.0,0.7853981633974483,0.8414709848078965, 1.570796326794897,0.881373587019543,0.881373587019543, 1.543080634815244,1.313035285499331,1.0,0.0,1.570796326794897, - 0.8427007929497148,0.0,0.5403023058681398,0.6420926159343306, + 0.8427007929497148,0.0,0.0,0.5403023058681398,0.6420926159343306, 1.188395105778121,1.175201193643801,0.8509181282393216,1.0, 2.718281828459045,1.4801364395941514,0.982793723247329]$ -- 2.11.4.GIT