Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.prolog > #15497
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Newsgroups | comp.lang.prolog |
| Subject | Float enhancements stalled? (Was: VIP0909: VibeCore Improvement Proposal [term_singletons]) |
| Date | 2026-03-22 17:20 +0100 |
| Message-ID | <10pp4ta$fcn1$1@solani.org> (permalink) |
| References | <107cdlv$3ok9q$1@solani.org> |
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
Back to comp.lang.prolog | Previous | Next — Next in thread | Find similar
Float enhancements stalled? (Was: VIP0909: VibeCore Improvement Proposal [term_singletons]) Mild Shock <janburse@fastmail.fm> - 2026-03-22 17:20 +0100 VIP0106: IEEE special values ordering in Prolog (Re: Float enhancements stalled?) Mild Shock <janburse@fastmail.fm> - 2026-03-24 08:35 +0100
csiph-web