Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

You don't need a negative number to solve that fyi.


sort by: page size:

negative numbers not used?

If you count zero as a positive number then one solution is:

0, 109552575, 29354524 :)


It leaves out negative zero.

TIL a number in parentheses is negative :)

What? (Or are you not counting subtraction as negative numbers?)

Doesn't negative imply nonzero? :)

Negative zero doesn't exist for integers either.

Negative numbers don’t work either, naturally.

Ah no, scratch that. I forgot about negative numbers...

Edit: It seems I forgot about zero as well!


Zero isn't a positive integer.

0 is not a positive number.

The level on subtraction doesn't mention how negative numbers are handled at all.

You need to minus 1 if the number is < 0

An integer doesn't need a point.

Another question is whether you'd want to include negative zero as a positive integer.

The joke is that, if you don't need to check if the input is negative because it is not a natural number, you can also choose a definition of the natural number without zero to avoid special casing it at all.

I'd say that zero being it's own negative number is an important thing not to forget. :)

Very interesting article.

On a related not, check out the book "Negative Math": http://www.amazon.com/Negative-Math-Mathematical-Rules-Posit...

This book builds up a mathematics in which multiplying two negative numbers gives you a negative, not a positive. The results are very interesting, particularly this: There are no complex numbers. The root of -1 is -1.

This is another example of something you never think to question, you always assume is "just the natural way", but which was a somewhat arbitrary choice and can be changed.


1 / 0 = ±8

Or if you must, you do that thing where you pick the positive option à la v

next

Legal | privacy