Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Floating Point  (Read 671 times)

Mia

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 101
  • Generic Amiga User
Floating Point
« on: February 06, 2017, 05:01:26 PM »

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?
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 838
  • Compile-time wierdo
Re: Floating Point
« Reply #1 on: February 06, 2017, 06:23:23 PM »

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.
Logged

Mia

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 101
  • Generic Amiga User
Re: Floating Point
« Reply #2 on: February 07, 2017, 05:33:55 PM »

Logged

Sidewinder

  • Forum Mod
  • A600
  • *****
  • Karma: 0
  • Offline Offline
  • Posts: 147
    • http://www.liquido2.com/
Re: Floating Point
« Reply #3 on: February 07, 2017, 05:54:16 PM »

« Last Edit: February 07, 2017, 05:55:56 PM by Sidewinder »
Logged
- Sidewinder

Mia

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 101
  • Generic Amiga User
Re: Floating Point
« Reply #4 on: February 07, 2017, 11:37:16 PM »

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)
Logged
Pages: [1]   Go Up