Floating Point

Started by Mia, February 06, 2017, 05:01:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mia

single precision (4 bytes) AMOS floating point numbers are not IEEE 754 - without digging into the code, does anyone have a description of the format please?

specifically I'm converting 32bit float wav files - I'm doing the endian-ness changes, but the value returned is just incorrect as AMOS stores them in the so called "Fast Floating Point Format" - but I've been unable to find any references yet...

there is a nice hex/binary converter here:

http://babbage.cs.qc.cuny.edu/IEEE-754.old/32bit.html

any ideas?

SamuraiCrow

Motorola fast floating point is a format included in a pair of libraries with AmigaOS.  You need to include the Motorola name in your search query.

Mia


Sidewinder

#3
- Sidewinder

Mia

and there's the full library specs on:

http://wiki.amigaos.net/wiki/Math_Libraries

I got it working, by loading D0 with a fake integer of the float data:
Dreg(0)=DATA
DATA=Lib Call(6,Lvo("SPFieee"))
Loke Varptr(FLOAT#), Leek(Varptr(DATA))

it's not too slow, I'm just so happy it's working now  8)