We have moved to a new Sailfish OS Forum. Please start new discussions there.
9

[Bug] Division by zero is infinity on calculator

asked 2014-06-27 19:14:14 +0200

PyroDevil gravatar image

updated 2014-06-27 19:14:37 +0200

Hi, I just tested the calculator on my Jolla phone and it returns infinity ∞ when entering 1/0, and that is wrong... really.

Please fix this.

Cheers

PyroDevil

edit retag flag offensive close delete

Comments

Hum. The limit of N/0 is always infinity for N != 0 (positive or negative acording to the direction in which you approach 0). I think this is what they meant by this result?

DaTa ( 2014-06-27 20:42:09 +0200 )edit
4

Correct behaviour would be to implode. Or at least, do a factory reset.

mholo65 ( 2014-06-27 21:06:53 +0200 )edit

In R, 1/0 gives also ∞ (and -1/0 -∞). I think there is a bug in R...

Vivien ( 2014-06-28 00:36:44 +0200 )edit

It's likely a bug, but they can't fix it because of bugwarts compatibility.

PyroDevil ( 2014-06-28 12:34:37 +0200 )edit

note: 0/0 returns NaN.

side note: any error message could be shown as is. instead of witty (not anymore) things like 'Oops..'

User ( 2014-06-29 10:15:36 +0200 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2014-06-27 19:23:12 +0200

simo gravatar image

updated 2014-06-28 00:34:54 +0200

No way to deliver 1000 000 Jolla's to 0 customers, so this really needs a fix soon!

From wiki:

In computing, a program error may result from an attempt to divide by zero. Depending on the programming environment and the type of number (e.g. floating point, integer) being divided by zero, it may generate positive or negative infinity by the IEEE 754 floating point standard, generate an exception, generate an error message, cause the program to terminate, or result in a special not-a-number value.

I suggest a non-number answer "unlike".

1 Jolla (a leftover) is accepted to be delivered to 0 customers - however, it doesn't bring us infinite amount of phones, neither infinite amount of customers ;)

edit flag offensive delete publish link more

Comments

5

why is this calculator not open source?

chappi ( 2014-06-27 19:40:59 +0200 )edit

Yeah, this should give a NaN.

gexc ( 2014-06-27 20:12:57 +0200 )edit
4

or it could give "Unlike"

simo ( 2014-06-27 22:15:56 +0200 )edit

@simo pure genius ;-)

IZ1IVA ( 2014-06-27 22:19:26 +0200 )edit
1

I would suggest an "unlike" operator for the calculator...

PyroDevil ( 2014-06-27 22:37:41 +0200 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2014-06-27 19:14:14 +0200

Seen: 516 times

Last updated: Jun 28 '14