CLP(FD): Please use (//)/2 for truncated integer division

20 views
Skip to first unread message

Markus Triska

unread,
Jan 5, 2015, 9:11:18 AM1/5/15
to swi-p...@googlegroups.com
Hi all,

please use (//)2 for truncated integer division (rounding towards zero) in your CLP(FD) programs, as in:

X #= Y // Z

This syntax has already been supported for several months and works in SWI >= 7.1.18.

Previously, truncated integer division was provided by (/)/2. The semantics of (/)/2 in CLP(FD) arithmetic expressions is going to change in the future (accompanied by more information), so please change / to // in your current CLP(FD) arithmetic expressions.

To support you during the transition period, (/)/2 will continue to be available in its current form for the next 3 development releases.

Thank you and all the best!
Markus

Michael Hendricks

unread,
Jan 9, 2015, 12:41:05 PM1/9/15
to Markus Triska, swi-p...@googlegroups.com
Thanks Markus for giving us notice.  I've published a new version of my julian pack with these changes.  Everything went smoothly.


--
You received this message because you are subscribed to the Google Groups "SWI-Prolog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swi-prolog+...@googlegroups.com.
Visit this group at http://groups.google.com/group/swi-prolog.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages