mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
Add run math test
This commit is contained in:
parent
19dad2ee94
commit
e0642c239b
@ -389,9 +389,6 @@ String/encode_ascii (String/Nil) = (List/Nil)
|
|||||||
# The Pi constant.
|
# The Pi constant.
|
||||||
Math/PI = 3.1415926535
|
Math/PI = 3.1415926535
|
||||||
|
|
||||||
# The Euler's number.
|
|
||||||
Math/E = 2.717281728
|
|
||||||
|
|
||||||
# Math/sin(a: f24) -> f24
|
# Math/sin(a: f24) -> f24
|
||||||
# Computes the sine of the given angle in radians.
|
# Computes the sine of the given angle in radians.
|
||||||
hvm Math/sin:
|
hvm Math/sin:
|
||||||
|
18
tests/golden_tests/run_file/math.bend
Normal file
18
tests/golden_tests/run_file/math.bend
Normal file
@ -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),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user