lua-users home
lua-l archive

Re: __bshr vs __bshl

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2018年04月07日 07:17 PM, Albert Chan wrote:
On Apr 7, 2018, at 5:18 PM, Soni They/Them L. <fakedme@gmail.com> wrote:
Why have __add or __unm at all anyway
A + B == A - (0 - B)
-A == (0 - A)
Killing two birds with one stone ?
Nice shot
Also why have __mul
A * B == A / (1 / B)
No, you cannot remove __mul like that,
Example:
1 * 49 = 49.0
1 / (1/49) = 1 / 0.02040816326530612 = 49.00000000000001
Ah, right, we only have floats. The math is correct tho.
--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.

AltStyle によって変換されたページ (->オリジナル) /