After adding the exception "exOverflow", it worked. The exception "exZeroDivide" could then be removed. Thanks for this.
Can the code remain like this or is there a way to fix this properly? Does this hint to a bug in libSDL2?
I tested your code under Linux amd64 and it works.
About exception, I suppose you know the trick:
...
uses math, ...
...
begin
SetExceptionMask(GetExceptionMask + [exZeroDivide] + [exInvalidOp] +
[exDenormalized] + [exOverflow] + [exUnderflow] + [exPrecision]);
...