99
99
(ifelse (isint, nan, one (u)), ifelse (isint, nan, - floor (u))),
100
100
)
101
101
102
- @scalar_rule deg2rad (x) π / oftype (x, 180 )
103
- @scalar_rule rad2deg (x) oftype (x, 180 ) / π
102
+ @scalar_rule deg2rad (x) deg2rad ( one (x) )
103
+ @scalar_rule rad2deg (x) rad2deg ( one (x))
104
104
105
105
@scalar_rule (ldexp (x, y), (2 ^ y, NoTangent ()))
106
106
@@ -114,23 +114,23 @@ end
114
114
@scalar_rule atanh (x) inv (1 - x ^ 2 )
115
115
116
116
117
- @scalar_rule acosd (x) ( - ( oftype (x, 180 )) / π) / sqrt (1 - x ^ 2 )
118
- @scalar_rule acotd (x) ( - ( oftype (x, 180 )) / π) / ( 1 + x ^ 2 )
119
- @scalar_rule acscd (x) (( - ( oftype (x, 180 )) / π) / x ^ 2 ) / sqrt (1 - x ^ - 2 )
120
- @scalar_rule acscd (x:: Real ) (( - ( oftype (x, 180 )) / π) / abs (x)) / sqrt (x ^ 2 - 1 )
121
- @scalar_rule asecd (x) (( oftype (x, 180 ) / π) / x ^ 2 ) / sqrt (1 - x ^ - 2 )
122
- @scalar_rule asecd (x:: Real ) (( oftype (x, 180 ) / π) / abs (x)) / sqrt (x ^ 2 - 1 )
123
- @scalar_rule asind (x) ( oftype (x, 180 ) / π) / sqrt (1 - x ^ 2 )
124
- @scalar_rule atand (x) ( oftype (x, 180 ) / π) / ( 1 + x ^ 2 )
117
+ @scalar_rule acosd (x) - inv ( deg2rad ( sqrt (1 - x ^ 2 )) )
118
+ @scalar_rule acotd (x) - inv ( deg2rad ( 1 + x ^ 2 ) )
119
+ @scalar_rule acscd (x) - inv ( deg2rad (x ^ 2 * sqrt (1 - x ^ - 2 )) )
120
+ @scalar_rule acscd (x:: Real ) - inv ( deg2rad ( abs (x) * sqrt (x ^ 2 - 1 )) )
121
+ @scalar_rule asecd (x) inv ( deg2rad (x ^ 2 * sqrt (1 - x ^ - 2 )) )
122
+ @scalar_rule asecd (x:: Real ) inv ( deg2rad ( abs (x) * sqrt (x ^ 2 - 1 )) )
123
+ @scalar_rule asind (x) inv ( deg2rad ( sqrt (1 - x ^ 2 )) )
124
+ @scalar_rule atand (x) inv ( deg2rad ( 1 + x ^ 2 ) )
125
125
126
126
@scalar_rule cot (x) - ((1 + Ω ^ 2 ))
127
127
@scalar_rule coth (x) - (csch (x) ^ 2 )
128
- @scalar_rule cotd (x) - (π / oftype (x, 180 )) * (1 + Ω ^ 2 )
128
+ @scalar_rule cotd (x) - deg2rad (1 + Ω ^ 2 )
129
129
@scalar_rule csc (x) - Ω * cot (x)
130
- @scalar_rule cscd (x) - (π / oftype (x, 180 )) * Ω * cotd (x)
130
+ @scalar_rule cscd (x) - deg2rad ( Ω * cotd (x) )
131
131
@scalar_rule csch (x) - (coth (x)) * Ω
132
132
@scalar_rule sec (x) Ω * tan (x)
133
- @scalar_rule secd (x) (π / oftype (x, 180 )) * Ω * tand (x)
133
+ @scalar_rule secd (x) deg2rad ( Ω * tand (x) )
134
134
@scalar_rule sech (x) - (tanh (x)) * Ω
135
135
136
136
@scalar_rule acot (x) - (inv (1 + x ^ 2 ))
@@ -139,11 +139,11 @@ end
139
139
@scalar_rule asec (x) inv (x ^ 2 * sqrt (1 - x ^ - 2 ))
140
140
@scalar_rule asec (x:: Real ) inv (abs (x) * sqrt (x ^ 2 - 1 ))
141
141
142
- @scalar_rule cosd (x) - (π / oftype (x, 180 )) * sind (x)
142
+ @scalar_rule cosd (x) - deg2rad ( sind (x) )
143
143
@scalar_rule cospi (x) - π * sinpi (x)
144
- @scalar_rule sind (x) (π / oftype (x, 180 )) * cosd (x)
144
+ @scalar_rule sind (x) deg2rad ( cosd (x) )
145
145
@scalar_rule sinpi (x) π * cospi (x)
146
- @scalar_rule tand (x) (π / oftype (x, 180 )) * (1 + Ω ^ 2 )
146
+ @scalar_rule tand (x) deg2rad (1 + Ω ^ 2 )
147
147
148
148
@scalar_rule sinc (x) cosc (x)
149
149
0 commit comments