[Cython] #303 + simplifying type system
Carl Witty
carl.witty at gmail.com
Wed May 13 22:42:01 CEST 2009
On Wed, May 13, 2009 at 1:31 PM, Dag Sverre Seljebotn
<dagss at student.matnat.uio.no> wrote:
> But that means there's still a real problem even if I fix #303; if we
> don't know the exact type for external types then e.g. temporaries from
> expressions of those could loose precision.
>
> Would it work to always allocate temps at the widest possible precision?
That doesn't sound like a good idea. The widest possible precisions
would presumably be "long long" (for integer) or "long double" (for
float) types; but on many platforms, "long long" is much slower than
"int" and "long double" is much slower than "double".
(And I'm pretty sure it's theoretically possible (allowed by the C
standard) to have integral types wider than "long long" and/or
floating-point types wider than "long double".)
Carl
More information about the Cython-dev
mailing list