09-09-2023, 02:31 PM
(09-09-2023, 01:42 PM)Dimster Wrote: Thank you very much mnrvo & DS. Great ideas here to work with.
It's hard to believe a math formula could actually come up with a None Number value (Not a Number). I guess it all boils down to if zero is a numeric value or a place holder for a void in the infinite number set.
Logically speaking division by zero shouldn't be infinity either. If zero is a void in the infinite number set (which a NaN result implies), then when we divide 3 apples among 0 people the resultant should be 3, not infinity.
I understand the history of math credits the Indians with the introduction of zero as a number (and introduced negative numbers) but before that zero was a void. So if zero is not a void and is a real number, then NaN should not exist. End of my rant on NaN.
I might be misunderstanding you, but I would note that NaN is not infinity or negative infinity, those both have separate floating point values. NaN simply means that there is no answer to what you're trying to do (Ex. distribute 3 apples among 0 people). There are other ways to get NaN, such as taking the square root of a negative, they're all actions that don't result in an answer.
I would also consider that if you allow division by zero to equal anything you break math Consider this:
Code: (Select All)
c=a/b
a=c*b ' Multiplication and division should be inverses of each-other, so this is always true
' So, if the answer c is supposed to =a when b=0 as you're proposing, then we have a problem
' It implies all numbers equal 0
c=a/0 ' Dividing a by zero. Should equal a, so we'll write that
a=c*0
a=0 ' c*0 is clearly zero.
Ex.
3=3/0 ' a=3, c=3
3=3*0 ' a=c*0
3=0 ' Err...
' Some equations also now have multiple solutions since a/0 and a/1 are the same. Consider:
a=a/x ' What is x? is it both 0 and 1?
a=a*x ' Do the same inverse as before
a*1=a*0 ' a/x and a*x both equal a
1=0 ' Divide off the a