Apparently -0 is a legit number. Hmm I wonder if it goes

..-3, -2, -1, -0, 0, 1, 2, 3...

Please fix it, BIS!

What is this sorcery?... -1 x 0 = -0 ??

Description

Apparently -0 is a legit number. Hmm I wonder if it goes

..-3, -2, -1, -0, 0, 1, 2, 3...

Please fix it, BIS!

Details

- Legacy ID
- 4217254346
- Severity
- None
- Resolution
- Fixed
- Reproducibility
- Always
- Category
- Scripting

Steps To Reproduce

execute

hint str (-1 * 0)

Comment Actions

someone needed a place to keep track of the sign, but for those parsing numbers might get ugly.

Comment Actions

Not actually a bug.

See http://en.wikipedia.org/wiki/IEEE_754.

It is standard for computer representation of number to have positive zero, negative zero, plus infinity, minus infinity and "Not A Number" signal value. Also, the function for raising a number into a power is called "pown".

Welcome to the wonderful worlds of computers :)

Comment Actions

Well, if this is not a bug then according to the same article we should have the concept of infinity so division by 0 should be possible, but it is not.

Comment Actions

Maybe we do, maybe we don't.

hint str 1e39 => "1.#INF"

hint str 1e500 => "1.#INF"

hint str 1e3903909403940390394 => "1.#INF"

so theoretically

hint str (1/0) => "1.#INF"

should be possible but you get zero divisor error

Comment Actions

i did not know the following but:

"Division by zero (an operation on finite operands gives an exact infinite result, e.g., 1/0 or log(0)) (returns ±infinity by default)." from the wikipedia article

(+infinity and -infinity)

Comment Actions

http://en.wikipedia.org/wiki/IEEE_754

http://en.wikipedia.org/wiki/Signed_zero

http://en.wikipedia.org/wiki/Sign_(mathematics)#Sign_of_zero

It seems this report was created for the sole purpose of creating a report.