MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_asin

Function test_asin

std/src/numerics.rs:1206–1219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1204
1205 #[test]
1206 fn test_asin() {
1207 check_expr_ok(0f64.asin(), "ASIN(0)");
1208 check_expr_ok(0.5f64.asin(), "ASIN(0.5)");
1209
1210 check_expr_ok_with_vars(0.5f64.asin(), "ASIN(d)", [("d", 0.5f64.into())]);
1211
1212 let mut t = Tester::default();
1213 t.run("DEG: result = ASIN(0.5)").expect_var("result", 0.5f64.asin().to_degrees()).check();
1214
1215 check_expr_compilation_error("1:10: ASIN expected n#", "ASIN()");
1216 check_expr_compilation_error("1:15: BOOLEAN is not a number", "ASIN(FALSE)");
1217 check_expr_compilation_error("1:10: ASIN expected n#", "ASIN(3, 4)");
1218 check_expr_error("1:15: Cannot take arc-sine of a number outside of [-1, 1]", "ASIN(-1.1)");
1219 }
1220
1221 #[test]
1222 fn test_atn() {

Callers

nothing calls this directly

Calls 7

check_expr_okFunction · 0.85
check_expr_ok_with_varsFunction · 0.85
check_expr_errorFunction · 0.85
expect_varMethod · 0.80
checkMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected