repl.txt (598B)
1 2 {{alias}}( x ) 3 Computes the cosine of a number minus one. 4 5 This function should be used instead of manually calculating `cos(x)-1` when 6 `x` is near unity. 7 8 Parameters 9 ---------- 10 x: number 11 Input value (in radians). 12 13 Returns 14 ------- 15 y: number 16 Cosine minus one. 17 18 Examples 19 -------- 20 > var y = {{alias}}( 0.0 ) 21 0.0 22 > y = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/4.0 ) 23 ~-0.293 24 > y = {{alias}}( -{{alias:@stdlib/constants/float64/pi}}/6.0 ) 25 ~-0.134 26 > y = {{alias}}( NaN ) 27 NaN 28 29 See Also 30 -------- 31