def rng_sin

bend-ml-tensor-gpu@0.1.5.1 · main.bend:640

import bend-ml-tensor-gpu@0.1.5.1/main.bend as BendMlTensorGpu
import Base

640# sin x and cos x for x in [0, pi/4], Taylor to x^9 and x^10 (the next terms are below 2^-28)
641def rng_sin(+x: F32) -> F32:
642  +z = (x * x : F32)
643  +c4 = (0.0001984127 - (z * 0.0000027557319 : F32) : F32)
644  +c3 = (0.008333334 - (z * c4 : F32) : F32)
645  +c2 = (0.16666667 - (z * c3 : F32) : F32)
646  (x - ((x * z : F32) * c2 : F32) : F32)

Uses (3)

Used by (1)