@@ -187,6 +187,22 @@ public static double Polyval(int N, double[] p, int s, double x)
187
187
return y ;
188
188
}
189
189
190
+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
191
+ public static double Polyval ( int N , in ReadOnlySpan < double > p , int s , double x )
192
+ {
193
+ double y = N < 0 ? 0 : p [ s ++ ] ;
194
+ while ( -- N >= 0 ) y = y * x + p [ s ++ ] ;
195
+ return y ;
196
+ }
197
+
198
+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
199
+ public unsafe static double Polyval ( int N , double * p , int s , double x )
200
+ {
201
+ double y = N < 0 ? 0 : p [ s ++ ] ;
202
+ while ( -- N >= 0 ) y = y * x + p [ s ++ ] ;
203
+ return y ;
204
+ }
205
+
190
206
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
191
207
public static double AngRound ( double x )
192
208
{
@@ -267,6 +283,7 @@ public static Pair AngDiff(double x, double y)
267
283
* The results obey exactly the elementary properties of the trigonometric
268
284
* functions, e.g., sin 9° = cos 81° = − sin 123456789°.
269
285
**********************************************************************/
286
+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
270
287
public static Pair Sincosd ( double x )
271
288
{
272
289
// In order to minimize round-off errors, this function exactly reduces
@@ -303,6 +320,7 @@ public static Pair Sincosd(double x)
303
320
* −1) = −180°, for ε positive and tiny;
304
321
* atan2d(±0, 1) = ±0°.
305
322
**********************************************************************/
323
+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
306
324
public static double Atan2d ( double y , double x )
307
325
{
308
326
// In order to minimize round-off errors, this function rearranges the
0 commit comments