Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

PS2 Floats #13

Description

@hch12907

Since this was (somewhat) mentioned in #12 ... I figured I might as well open an issue on this. Could be a low-priority though, since the games are not even running yet.

Basically, the FPU(s) of PS2 are not IEEE754 standard compliant, and infinites and NaNs in IEEE754 are actually even larger numbers in PS2. Subnormals are ignored too (instead they are zeroes), but no one cares about them, I guess...

There are some solutions to this, though I am not sure of their feasibility -

  • Clamp (Currently used)
    • Pros: Fast and easy
    • Cons: Horrible accuracy (there are 16 million numbers ignored)
  • Software floats
    • Pros: Superb accuracy
    • Cons: It's slow. And takes quite some time to implement it.
  • Using doubles as the intermediate
    • Pros: Good accuracy, pretty easy to do
    • Cons: Not sure of the performance... double arithmetic could be as fast as single (I think just a few µs of difference, for the worst case), but only if the CPU supports AVX (or SVE, if we consider ARM).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions