File tree 2 files changed +14
-26
lines changed
src/libraries/System.Private.CoreLib/src/System
2 files changed +14
-26
lines changed Original file line number Diff line number Diff line change @@ -1195,15 +1195,12 @@ public static double MinMagnitude(double x, double y)
1195
1195
/// <para>On ARM64 hardware this may use the <c>FRECPE</c> instruction which performs a single Newton-Raphson iteration.</para>
1196
1196
/// <para>On hardware without specialized support, this may just return <c>1.0 / d</c>.</para>
1197
1197
/// </remarks>
1198
- [ Intrinsic ]
1199
- public static double ReciprocalEstimate ( double d )
1200
- {
1201
1198
#if MONO
1202
- return 1.0 / d ;
1199
+ public static double ReciprocalEstimate ( double d ) => 1.0 / d ;
1203
1200
#else
1204
- return ReciprocalEstimate ( d ) ;
1201
+ [ Intrinsic ]
1202
+ public static double ReciprocalEstimate ( double d ) => ReciprocalEstimate ( d ) ;
1205
1203
#endif
1206
- }
1207
1204
1208
1205
/// <summary>Returns an estimate of the reciprocal square root of a specified number.</summary>
1209
1206
/// <param name="d">The number whose reciprocal square root is to be estimated.</param>
@@ -1212,15 +1209,12 @@ public static double ReciprocalEstimate(double d)
1212
1209
/// <para>On ARM64 hardware this may use the <c>FRSQRTE</c> instruction which performs a single Newton-Raphson iteration.</para>
1213
1210
/// <para>On hardware without specialized support, this may just return <c>1.0 / Sqrt(d)</c>.</para>
1214
1211
/// </remarks>
1215
- [ Intrinsic ]
1216
- public static double ReciprocalSqrtEstimate ( double d )
1217
- {
1218
- #if MONO
1219
- return 1.0 / Sqrt ( d ) ;
1212
+ #if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64
1213
+ public static double ReciprocalSqrtEstimate ( double d ) => 1.0 / Sqrt ( d ) ;
1220
1214
#else
1221
- return ReciprocalSqrtEstimate ( d ) ;
1215
+ [ Intrinsic ]
1216
+ public static double ReciprocalSqrtEstimate ( double d ) => ReciprocalSqrtEstimate ( d ) ;
1222
1217
#endif
1223
- }
1224
1218
1225
1219
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1226
1220
public static decimal Round ( decimal d )
Original file line number Diff line number Diff line change @@ -313,15 +313,12 @@ public static float MinMagnitude(float x, float y)
313
313
/// <para>On ARM64 hardware this may use the <c>FRECPE</c> instruction which performs a single Newton-Raphson iteration.</para>
314
314
/// <para>On hardware without specialized support, this may just return <c>1.0 / x</c>.</para>
315
315
/// </remarks>
316
- [ Intrinsic ]
317
- public static float ReciprocalEstimate ( float x )
318
- {
319
316
#if MONO
320
- return 1.0f / x ;
317
+ public static float ReciprocalEstimate ( float x ) => 1.0f / x ;
321
318
#else
322
- return ReciprocalEstimate ( x ) ;
319
+ [ Intrinsic ]
320
+ public static float ReciprocalEstimate ( float x ) => ReciprocalEstimate ( x ) ;
323
321
#endif
324
- }
325
322
326
323
/// <summary>Returns an estimate of the reciprocal square root of a specified number.</summary>
327
324
/// <param name="x">The number whose reciprocal square root is to be estimated.</param>
@@ -331,15 +328,12 @@ public static float ReciprocalEstimate(float x)
331
328
/// <para>On ARM64 hardware this may use the <c>FRSQRTE</c> instruction which performs a single Newton-Raphson iteration.</para>
332
329
/// <para>On hardware without specialized support, this may just return <c>1.0 / Sqrt(x)</c>.</para>
333
330
/// </remarks>
334
- [ Intrinsic ]
335
- public static float ReciprocalSqrtEstimate ( float x )
336
- {
337
- #if MONO
338
- return 1.0f / Sqrt ( x ) ;
331
+ #if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64
332
+ public static float ReciprocalSqrtEstimate ( float x ) => 1.0f / Sqrt ( x ) ;
339
333
#else
340
- return ReciprocalSqrtEstimate ( x ) ;
334
+ [ Intrinsic ]
335
+ public static float ReciprocalSqrtEstimate ( float x ) => ReciprocalSqrtEstimate ( x ) ;
341
336
#endif
342
- }
343
337
344
338
[ Intrinsic ]
345
339
public static float Round ( float x )
You can’t perform that action at this time.
0 commit comments