View Single Post
08-08-14, 07:59 PM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by Torhal View Post
They've done this for the past few betas - I believe it's so they can optimize the default UI; cut out any instances of division-by-zero that are otherwise handled (likely less efficiently) by the live version's Lua parser. Division by zero is, after all, something most programmers code against, not for.
Lua is one of the few languages that makes use of the full IEEE 754 specification for floating point numbers by allowing the casting of divide-by-zero into signed infinity. Whether this is natively done by the computer's floating point processor or trapped and substituted for by the Lua interpreter, it would be much faster since the execution lies in C code rather than forcing the check through the interpreter itself.


Their decision to force Lua to throw division-by-zero errors was to make it act more like C.
Originally Posted by Bashiok
This is an intended change to keep the lua engine in line with changes to our game engine.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)