mitsuba-renderer / drjit

Dr.Jit — A Just-In-Time-Compiler for Differentiable Rendering
BSD 3-Clause "New" or "Revised" License
601 stars 45 forks source link

Fix the behavior of ``copysign``, ``mulsign``, etc. #300

Closed wjakob closed 1 month ago

wjakob commented 1 month ago

Extracting the sign bit using comparison operators is not portable across platforms. This commit makes operations like of copysign, mulsign, etc., examine the actual bit pattern.