[PYTHON MATRIX-SIG] Numeric typecodes
Dale Bertrand
Dale_Bertrand@brown.edu
Fri, 07 Feb 1997 20:14:56 -0500
>> I'm using a pre 1.0 version of Numeric which does seem to support all the
>> typecodes in v1.0. For the available types for Floats are 'd' and 'f'.
>> Would someone please tell me how many bytes these use to represent floating
>> point data?
>
>Same as the underlying data they represent, i.e. for a float, 'f', on a
>sparc (which you're on ;) i believe it's 4 bytes. A double, 'd', is 8
>bytes.
Since I can't throw 2 byte Float into an array, thinking about manipulating
the two bytes into a 4 byte float by adding two bytes in the right places
for each value. Will this work? I've made a diagram below.
** **
** ** 2 byte float
** **
| |
| ---
| |
** ** ** **
** ** ** ** 4 byte float
** ** ** **
^ ^
| |
(added zero bytes)
---
Dale Bertrand
--------
email: dale_bertrand@brown.edu
quote: "I dislike forwards and silly quotes"
_______________
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________