From e0642c239bc19c53f5d5b6fbf838c7fd0d0b213a Mon Sep 17 00:00:00 2001 From: imaqtkatt Date: Thu, 4 Jul 2024 14:30:28 -0300 Subject: [PATCH] Add run math test --- src/fun/builtins.bend | 3 --- tests/golden_tests/run_file/math.bend | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 tests/golden_tests/run_file/math.bend diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend index 821d7ee3..3080724e 100644 --- a/src/fun/builtins.bend +++ b/src/fun/builtins.bend @@ -389,9 +389,6 @@ String/encode_ascii (String/Nil) = (List/Nil) # The Pi constant. Math/PI = 3.1415926535 -# The Euler's number. -Math/E = 2.717281728 - # Math/sin(a: f24) -> f24 # Computes the sine of the given angle in radians. hvm Math/sin: diff --git a/tests/golden_tests/run_file/math.bend b/tests/golden_tests/run_file/math.bend new file mode 100644 index 00000000..0a92231a --- /dev/null +++ b/tests/golden_tests/run_file/math.bend @@ -0,0 +1,18 @@ +def main: + use rad = Math/radians + return [ + Math/sin(rad(30.0)), + Math/cos(rad(30.0)), + Math/tan(rad(30.0)), + + Math/cot(rad(30.0)), + Math/sec(rad(30.0)), + Math/csc(rad(30.0)), + + rad(67.4), + + Math/sqrt(9.0), + + Math/ceil(9.75), + Math/floor(9.75), + ]