mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-23 00:18:47 +00:00
"Fix" weird edge-case with Atanh returning incorrect value 1x10^-16
This commit is contained in:
parent
14148f751a
commit
7577fc1c99
@ -201,7 +201,16 @@ public class DoubleTests
|
||||
[TestMethod]
|
||||
public void Atanh_ShouldBeCorrect()
|
||||
{
|
||||
Assert.AreEqual(0.5493061443340549, 0.5.Atanh());
|
||||
try
|
||||
{
|
||||
Assert.AreEqual(0.5493061443340548, 0.5.Atanh());
|
||||
}
|
||||
catch
|
||||
{
|
||||
// floating point rounding errors cause this value to be different on CI vs my local machine.
|
||||
// I have no idea why, but here we are. if THIS assertion fails, we'll just throw it back
|
||||
Assert.AreEqual(0.5493061443340549, 0.5.Atanh());
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
Loading…
Reference in New Issue
Block a user