diff options
| author | dcastell1 <dcastell1@users.noreply.github.com> | 2026-11-22 10:36:36 +0100 |
|---|---|---|
| committer | dcastell1 <dcastell1@users.noreply.github.com> | 2026-11-22 10:36:36 +0100 |
| commit | 4cb0e0d88416a2087de6c96299daf42468618d57 (patch) | |
| tree | bea1aaf35cf811b82571b50667e696ee48b75778 /runtime/test/tiny_game_exit_code_test.cpp | |
| parent | 426023a585b47ba04509d5f3e5e52d6ae40e1109 (diff) | |
translator: reduce v_sin/v_cos in turns before scaling by 2*pi
RDNA takes the operand in turns and range-reduces in turns. Scaling by
2*pi first loses the fractional part for large inputs (up to 1e-4 at 255
turns) and leaves Sin outside [-pi, pi], where Vulkan does not guarantee
its precision. Add Gen.turn_angle: Fract, centre to [-0.5, 0.5), keep -0
as -0, then scale. Use it for both the f32 and f16 paths.
Adds semantic tests at 100.3 and 254.51 turns (old translation is 1.4e-5
off), f16 at 100 turns, and -0 sign preservation; the mutation anchor is
updated to the shared helper.
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions