Don wrote:
I've just put a comment on bug 3171, I'm not sure that we really want
IEEE behaviour. It obeys a == b * nearbyint(a/b) + a % b, but...
I saw that. Wild. But I think we should conform to IEEE behavior, even
if it seems strange.
Walter Bright wrote:
Don wrote:
Close, but that's technically not true in the case where abs(a/b) >
long.max. (The integer doesn't have to fit into a 'long').
In IEEE754, r= a % b is defined by the mathematical relation r = a –
b * n , where n is the integer nearest the exact number a/b ;
Andrei Alexandrescu wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=3171
What are friends for?
Ridiculing the cars my friends drive, of course!
Walter Bright wrote:
Andrei Alexandrescu wrote:
Don wrote:
Close, but that's technically not true in the case where abs(a/b) >
long.max. (The integer doesn't have to fit into a 'long').
But if real is 79-bit long (as on Intel), the largest integer that
could fit without loss in 1 << 63, and
Andrei Alexandrescu wrote:
Don wrote:
Close, but that's technically not true in the case where abs(a/b) >
long.max. (The integer doesn't have to fit into a 'long').
But if real is 79-bit long (as on Intel), the largest integer that could
fit without loss in 1 << 63, and that would fit in a lo
Don wrote:
Close, but that's technically not true in the case where abs(a/b) >
long.max. (The integer doesn't have to fit into a 'long').
In IEEE754, r= a % b is defined by the mathematical relation r = a – b
* n , where n is the integer nearest the exact number a/b ; whenever
abs( n – a/b
On Mon, 13 Jul 2009 08:51:06 -0400, Andrei Alexandrescu
wrote:
Michiel Helvensteijn wrote:
Andrei Alexandrescu wrote:
The multiplicative expressions are multiplication (\ccbox{a * b}),
division (\ccbox{a / b}), and remainder (\ccbox{a \% b}). They
operate on numeric types onl
Michiel Helvensteijn wrote:
Andrei Alexandrescu wrote:
The multiplicative expressions are multiplication (\ccbox{a * b}),
division (\ccbox{a / b}), and remainder (\ccbox{a \% b}). They
operate on numeric types only. The result type of either of these
operations is same as
Don wrote:
Close, but that's technically not true in the case where abs(a/b) >
long.max. (The integer doesn't have to fit into a 'long').
But if real is 79-bit long (as on Intel), the largest integer that could
fit without loss in 1 << 63, and that would fit in a long. Are you
saying r could
Andrei Alexandrescu wrote:
> The multiplicative expressions are multiplication (\ccbox{a * b}),
> division (\ccbox{a / b}), and remainder (\ccbox{a \% b}). They
> operate on numeric types only. The result type of either of these
> operations is same as the type of \ccbox
Andrei Alexandrescu wrote:
Ok, here's how I rewrote the section on multiplicative operations. The
text is hardly intelligible due to all formatting, sorry about that (but
it looks much better in a specialized editor). Comments and suggestions
welcome.
\subsection{Multiplicative Expressions}
TomD wrote:
Andrei Alexandrescu Wrote:
[...]
The multiplicative expressions are multiplication (\ccbox{a * b}),
division (\ccbox{a / b}), and remainder (\ccbox{a \% b}). They
operate on numeric types only. The result type of either of these
operations is same as the type
Andrei Alexandrescu Wrote:
[...]
>
> The multiplicative expressions are multiplication (\ccbox{a * b}),
> division (\ccbox{a / b}), and remainder (\ccbox{a \% b}). They
> operate on numeric types only. The result type of either of these
> operations is same as the type o
Ok, here's how I rewrote the section on multiplicative operations. The
text is hardly intelligible due to all formatting, sorry about that (but
it looks much better in a specialized editor). Comments and suggestions
welcome.
\subsection{Multiplicative Expressions}
The multiplicative expressi
14 matches
Mail list logo