mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-23 14:35:12 +00:00
Switch Num.tan to a zig builtin
It should be able to share some work between sine and cosine to run faster.
This commit is contained in:
parent
7986d6cdba
commit
108d9a54e3
11 changed files with 25 additions and 4 deletions
|
@ -935,6 +935,7 @@ pub(crate) fn run_low_level<'a, 'ctx>(
|
|||
| NumLogUnchecked
|
||||
| NumSin
|
||||
| NumCos
|
||||
| NumTan
|
||||
| NumCeiling
|
||||
| NumFloor
|
||||
| NumToFrac
|
||||
|
@ -2655,6 +2656,7 @@ fn build_float_unary_op<'a, 'ctx>(
|
|||
// trigonometry
|
||||
NumSin => call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_SIN[float_width]),
|
||||
NumCos => call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_COS[float_width]),
|
||||
NumTan => call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_TAN[float_width]),
|
||||
|
||||
NumAtan => call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_ATAN[float_width]),
|
||||
NumAcos => call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_ACOS[float_width]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue