Skip to content

Commit

Permalink
Uses to double
Browse files Browse the repository at this point in the history
  • Loading branch information
quajak committed Feb 23, 2018
1 parent 350b1aa commit 106abb8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/Cosmos.System2_Plugs/System/MathImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ public static double Log(double x)
{
bx[_i + (BitConverter.IsLittleEndian ? 4 : 0)] = bv[_i];
}
x = BitConverter.Int64BitsToDouble(BitConverter.ToInt64(bx, 0));
x = BitConverter.ToDouble(bx, 0);
k += (i >> 20);
f = x - 1.0;
if ((0x000fffff & (2 + hx)) < 3)
Expand Down Expand Up @@ -1016,8 +1016,7 @@ public static double Sqrt(double x)
valueBytes[I + offset] = toAddHigher[I];
valueBytes[I] = toAddLower[I];
}
long _bits = BitConverter.ToInt64(valueBytes, 0);
return BitConverter.Int64BitsToDouble(_bits);
return BitConverter.ToDouble(valueBytes, 0);
}

#endregion Sqrt
Expand Down

0 comments on commit 106abb8

Please sign in to comment.