• Float enhancements stalled? (Was: VIP0909: VibeCore ImprovementProposal [term_singletons])

    From Mild Shock@janburse@fastmail.fm to comp.lang.prolog on Sun Mar 22 17:20:58 2026
    From Newsgroup: comp.lang.prolog

    Hi,

    Somehow this link is broken ( Not Found ):

    *0106.0 Float enhancements Draft* https://prolog-lang.org/ImprovementsForum/0106-floats-enhancements.html

    Also there is no consensus between ECLiPSe and SWI in realization:
    ```
    /* Version 7.1beta #13 (x86_64_nt) */
    [eclipse 5]: X is min(1.5NaN, 3).
    X = 3.0
    Yes (0.00s cpu)
    [eclipse 6]: X is min(3, 1.5NaN).
    X = 1.5NaN
    Yes (0.00s cpu)

    /* SWI-Prolog (threaded, 64 bits, version 10.1.1) */
    ?- X is min(1.5NaN, 3).
    X = 1.5NaN.
    ?- X is min(3, 1.5NaN).
    X = 1.5NaN.
    ```
    Mostlikely SWI uses IEEE minimum. While ECLiPSe uses (a < b ? a : b).

    Bye

    P.S.: I am planning a kind of IEEE minNum behaviour:
    ```
    /* Dogelog Player 2.2.1 */
    ?- X is min(0rNaN, 3).
    X = 3.
    ?- X is min(3, 0rNaN).
    X = 3.
    ```
    Note that there is no coercion of 3 into 3.0.


    Mild Shock schrieb:
    Hi,

    Functional requirement:

    ?- Y = g(_,_), X = f(Y,C,D,Y), term_singletons(X, L),
       L == [C,D].

    ?- Y = g(A,X,B), X = f(Y,C,D), term_singletons(X, L),
       L == [A,B,C,D].

    Non-Functional requirement:

    ?- member(N,[5,10,15]), time(singletons(N)), fail; true.
    % Zeit 1 ms, GC 0 ms, Lips 4046000, Uhr 11.08.2025 01:36
    % Zeit 3 ms, GC 0 ms, Lips 1352000, Uhr 11.08.2025 01:36
    % Zeit 3 ms, GC 0 ms, Lips 1355333, Uhr 11.08.2025 01:36
    true.

    Can your Prolog system do that?

    P.S.: Benchmark was:

    singletons(N) :-
       hydra2(N,Y),
       between(1,1000,_), term_singletons(Y,_), fail; true.

    hydra2(0, _) :- !.
    hydra2(N, s(X,X)) :-
       M is N-1,
       hydra2(M, X).

    Bye

    --- Synchronet 3.21d-Linux NewsLink 1.2