Giter Site home page Giter Site logo

Comments (2)

peterhillman avatar peterhillman commented on June 29, 2024

This would be a simple fix. Seems these functions aren't used by OpenEXR. Probably worth changing for the OpenEXR-2.0 release?

diff --git a/IlmBase/Imath/ImathFun.cpp b/IlmBase/Imath/ImathFun.cpp
index 9209ff8..65cf620 100644
--- a/IlmBase/Imath/ImathFun.cpp
+++ b/IlmBase/Imath/ImathFun.cpp
@@ -124,7 +124,7 @@ succd (double d)

         u.i = 0x0000000000000001LL;
     }
-    else if (u.i > 0)
+    else if (u.d > 0)
     {
         // Positive double, normalized or denormalized.
         // Incrementing the largest positive double
@@ -159,7 +159,7 @@ predd (double d)

         u.i = 0x8000000000000001LL;
     }
-    else if (u.i > 0)
+    else if (u.d > 0)
     {
         // Positive double, normalized or denormalized.

ImathTest output:

d 1
sd 1.00000000000000022
pd 0.999999999999999889
spd 1
psd 1

d -1
sd -0.999999999999999889
pd -1.00000000000000022
spd -1
psd -1

old output:
d -1
sd -1.00000000000000022
pd -0.999999999999999889
spd -1
psd -1

from openexr.

peterhillman avatar peterhillman commented on June 29, 2024

Applied in 090505e - will only affect OpenEXR-2.0 and later release

from openexr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.