-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request predicate divmod/4 #71
Comments
Further problem, I cannot rewrite it into div and mod, I then get this error:
div/2 came into ISO core Prolog in 2012:
|
Thanks for the suggestion! You may try this:
which actually gives an implementation for div/3 (before we introduce it as an arithmetic expression):
|
It uses two bigint operations, mod/2 and (//)/2.
Which can be used to implement divmod/4. I don't know |
No, Ciao uses its own implementation of bignums. Of course we could add it, but is there any example where performance of this operation is critical? |
What would be also useful, these evaluable functions:
Are they somewhere under a different name? |
This ticket is already 3 years old. It has the rotten smell So why not close it with won't fix? |
It is better not to close it because it is not solved. Open issues are reminders of things that need to done or would be good to do, for which we thank you. Unfortunately time is limited, snd thus when to get something done is indeed a matter of priorities, as @jfmc implied. |
Ciao Prolog is an excellent Prolog system. For example
But I remember that I was accused on SWI-Prolog a little bit more client oriented would surely help core standard, which has div already more than 12 years:
but have to check, maybe div/2 is already there? |
Its quite customary that Prolog systems nowadays
have divmod/4, because many bigint algorithms can
produce both div and mod at the same time.
Trying to port a SWI-Porlog program I get:
Could this be added to Ciao Prolog, especially the playground?
The text was updated successfully, but these errors were encountered: