Now I found a test case, where the Unix platform also fails.
Was increasing the bits in the case6/3
fuzzer:
pow2(B, E, X) :- E < 0, integer(E), !, X is 1/(B^(-E)).
pow2(B, E, X) :- X is B^E.
?- current_prolog_flag(iso, X).
X = false.
/* SWI-Prolog 8.5.20 WLS2 Nok */
?- repeat, L is -(1<<15), H is (1<<15)+1,
M is -(1<<3), J is (1<<3)+1, random(L, H, P),
random(M, J, Q), pow2(P, Q, A), B is P**Q, A=\=B.
P = -18573,
Q = -7,
A = -1.3116730299820406e-30,
B = -1.3116730299820408e-30 .
I have SWIPL on Unix platform only since weekend, could not do this
testing beforehand, so I guess I need to update case6/3 test cases,
because they showed Unix platform completely passing, which
seems to be wrong. I used in the old fuzzer 12 bits + 6 bits
, the
above uses 15 bits + 3 bits
, and new nasty test cases pop up.
Edit 25.10.2022
Its a test case where JDK 19 non-strict also fails. Cool!
I couldn’t believe that it is that good. It was too good to
be true. So its also not that good!
/* Jekejeke Prolog 1.5.5, JDK 19 non-strict Nok */
?- X is -18573** -7.
X = -1.3116730299820408E-30.