[Numpy-discussion] c++ code

Neal Becker ndbecker2@gmail....
Thu Dec 10 13:02:22 CST 2009

Here is my c++ code if you want to play with it.

You'll need to find constrained_value for boost (or I can provide it as a 
patch if you request).

As for semantics, different people actually want/expect different behavior.  
I chose the 'pythonic' approach.  If you do fpa @ fpb, where fpa,b are fixed 
point numbers of same/different sizes and @ is a binary op, my library will 
_not_ promote the output.  Explicit is better.  If you want a(32 bit) x b(32 
bit) -> c(64 bit), you promote the operands explicitly first.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run_time_fixed_pt.hpp
Type: text/x-c++hdr
Size: 7592 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091210/0fa4ddb8/attachment.bin 

More information about the NumPy-Discussion mailing list