Exemple #1
0
 public static float Pow(float x, float y)
 {
     if (x < 0.0F)
     {
         throw new ArgumentOutOfRangeException(nameof(x));
     }
     if (x == 0.0F)
     {
         if (y <= 0.0F)
         {
             throw new ArgumentOutOfRangeException(nameof(y));
         }
         return(0.0F);
     }
     return(MathV.Exp2(MathV.Log2(x) * y));
 }
Exemple #2
0
 public static Vector128 <float> Pow(Vector128 <float> x, Vector128 <float> y)
 {
     return(MathV.Exp2(Avx.Multiply(MathV.Log2(x), y)));
 }
Exemple #3
0
 public static float Log10(float value)
 {
     return(MathV.Log2ToLog10 * MathV.Log2(value));
 }
Exemple #4
0
 public unsafe static Vector128 <float> Log10(Vector128 <float> value)
 {
     return(Avx.Multiply(AvxExtensions.BroadcastScalarToVector128(MathV.Log2ToLog10), MathV.Log2(value)));
 }
Exemple #5
0
 public static float Ln(float value)
 {
     return(MathV.Log2ToNaturalLog * MathV.Log2(value));
 }