Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
/ ez80sf Public
forked from jacobly0/ez80sf

Single-precision floating-point routines for the eZ80

Notifications You must be signed in to change notification settings

Zeda/ez80sf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ez80sf

This is a library of single-precision floating-point routines for the eZ80.

How to use.

You'll need fasmg to compile these routines, which are located in the /src folder. Routines are named __fpxxxx. For example, __fpmul refers to the floating-point multuplication routine.

Contributing

Honestly, I still don't understand jacobly's test environment very well, so I can't add suggestions about that. However, float routines should follow some basic rules:

  • The first operand is in AUBC
  • The second operand is in EUHL
  • Output is in AUBC
  • If a routine doesn't require an argument, it must be preserved. For example, __fpln only takes one argument, so EUHL should be preserved.
  • Names of float routines should start with __fp and end with a short name indicating what the routine is. For example, __fpneg negates the input float.

To Do

We need to optimize division and square roots! Currently, division is using Newton-Raphson which is overkill on such small precision, and square roots are directly using Newton's method. Square roots should first evaluate at least 8 bits and then implement a very optimized version of Newton's method for square roots (using an auxilliary recurrence).

These two routines also directly affect the performance of logarithms, inverse trig, and inverse hyperbolics.

We also need:

  • sine
  • cosine
  • tangent
  • exponential
    • hyperbolic sine
    • hyperbolic cosine
    • hyperbolic tangent
  • 2^x
  • 10^x
  • x^y
  • log base 2
  • log base 10
  • log base y
  • Conversion to and from strings

About

Single-precision floating-point routines for the eZ80

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Assembly 57.4%
  • C 28.7%
  • C++ 7.1%
  • Makefile 6.8%