Ticket #460 (closed enhancement: fixed)

Opened 8 months ago

Last modified 5 months ago

Always type-infer floating point types

Reported by: dagss Owned by: scoder
Priority: major Milestone: 0.13
Component: Code Generation Keywords:
Cc:

Description

Depends on #236.

Since Python uses double for its float and complex types and all important operations on it can map directly to C space, and since Python<->C conversions are 1:1, we can safely turn on type-inference in this case without breaking anything.

This requires that #236 is implemented first though so that any use of attributes or methods goes through.

Note that, at least if typeinference is turned off, this means that

cdef float x = 3.2
y = x # y will be typed as double,
      # so as to behave as if y was a Python
      # object

Unresolved issue: If typeinference is turned on, perhaps y should be typed as float instead.

Change History

Changed 5 months ago by scoder

  • owner changed from somebody to scoder

This is implemented as part of the safe type inference mode.

Changed 5 months ago by scoder

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.