On 23 July 2012 00:13, John Myles White <
johnmyl...@gmail.com> wrote:
> I think John was making the value-laden assertion (which I basically agree with) that no one wants integer division as their default definition of Int / Int. After all, most programmers aren't reimplementing the Euclidean algorithm day after day.
Computer algebraists would see things differently. But algebra is a
small part of mathematics. There are many more numerically minded
>
> -- John
>
> On Jul 22, 2012, at 4:05 PM, Bill Hart wrote:
>
>> On 22 July 2012 23:51, John Cowan <
johnw...@gmail.com> wrote:
>>> On Sun, Jul 22, 2012 at 5:21 PM, dslate <
rusti...@gmail.com> wrote:
>>>
>>>> I always thought it was a bad idea for the "/" operator
>>>> in dynamic languages to truncate results if and only if both operands
>>>> happened to be integers.
>>>
>>> I agree entirely. Returning the wrong answer is never the right idea.
>>
>> Mathematically a float can't exactly return the correct answer. So by
>> that reasoning it should return a fraction not a float.
>>
>>> Even in ML and Haskell, which are statically typed, / returns a float
>>> and div and quot are used for integer division.
>>>
>>> Of course C/C++ are trapped by backward compatibility.
>>>
>>> --
>>> GMail doesn't have rotating .sigs, but you can see mine at
>>>
http://www.ccil.org/~cowan/signatures
>>>
>>> --
>>>
>>>
>>>
>>
>> --
>>
>>
>>
>