Was lazy making manual test cases, so used a fuzzer.
So far only testing float/1 with bigint argument from
new SWI-Prolog 8.5.18. The fuzzer test cases might not
be that good, especially for HALF_EVEN, since they might
not pick up the border cases, but nevertheless its a first start.
Might do more test cases. The test cases are simply:
cases.p.log (7,9 KB)
My Prolog systems, formerly Jekejeke Prolog and Dogelog
Player on its various target platforms, all pass these test cases.
Here are some very first results for other Prolog systems:
/* SWI-Prolog 8.5.18 (Windows and WASM) Ok */
?- case(N, X, Y), Y =\= float(X).
false.
/* Trealla Prolog 2.4.3 Ok */
?- case(N, X, Y), Y =\= float(X).
false.
/* Scryer Prolog 0.9.0 Nok */
?- case(N, X, Y), Y =\= float(X).
N = 1, X = -572504891324561953821040518484, Y = -5.7250489132456196e29
; N = 3, X = 884996183305110611102854483978, Y = 8.849961833051106e29
; N = 4, X = 1251939306673717603656775488197, Y = 1.2519393066737177e30
Etc..
So somehow these test cases already do their job!
Edit 10.10.2022
More results:
/* Ciao Prolog 1.22.0 (WSL and WASM) Ok */
?- case(N, X, Y), Y =\= float(X).
no
/* ECLiPSe Prolog 7.0.61 Nok */
?- case(N, X, Y), Y =\= float(X).
N = 1
X = -572504891324561953821040518484
Y = -5.7250489132456196e+29
Etc..