Skip to content
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

Compatibility issue evaluable function (^)/2 missing #72

Open
Jean-Luc-Picard-2021 opened this issue Sep 21, 2022 · 3 comments
Open

Compatibility issue evaluable function (^)/2 missing #72

Jean-Luc-Picard-2021 opened this issue Sep 21, 2022 · 3 comments
Labels

Comments

@Jean-Luc-Picard-2021
Copy link

Jean-Luc-Picard-2021 commented Sep 21, 2022

Now I get:

?- X is 33^10.
{ERROR: No handle found for thrown exception error(type_error(evaluable,33^10),'arithmetic:is'/2-2)}

But this function is listed here:

DRAFT TECHNICAL CORRIGENDUM 2
https://www.complang.tuwien.ac.at/ulrich/iso-prolog/dtc2#pow

@Jean-Luc-Picard-2021 Jean-Luc-Picard-2021 changed the title Feature request evaluable function (^)/2 missing Compatibility issue evaluable function (^)/2 missing Sep 21, 2022
@Jean-Luc-Picard-2021
Copy link
Author

Jean-Luc-Picard-2021 commented Sep 28, 2022

An interesting test case would be, in case (^)/2 arrives in Ciao Prolog,
what the outcome of this here is. Currently a disagreement between
SWI-Prolog and ECLiPSe Prolog, possibly caused by float/1:

/* SWI-Prolog 8.5.17 */
?- X is float(51^10).
X = 1.19042423827613e+17.

/* ECLiPSe Prolog 7.0.61 */
?- X is float(51^10).
X = 1.1904242382761301e+17

The problem is related to this ticket here, but the later ticket
mentions (**)/2 and not (^)/2. So the test cases are different.

@Jean-Luc-Picard-2021
Copy link
Author

How do I run tests in Ciao Prolog that are written in ISO
including Corr.1 and Corr.2. I cannot run my SAT Solver tests:

?- time(suite_quiet).
{ERROR: arithmetic:is/2, arg 2 - expected an arithmetically
evaluable expression, found ^(2,18)}

The error still persists in release 1.22.0 of Ciao Prolog.
When do these gaps get filled?

@Jean-Luc-Picard-2021
Copy link
Author

Jean-Luc-Picard-2021 commented Nov 28, 2023

For exampe SWI-Prolog has a very fast (^)/2
because of GMP support. You can even try this one:

/* SWI-Prolog 9.1.17 */
?- time(_ is 9^(9^9)).
% -1 inferences, 6.063 CPU in 6.308 seconds (96% CPU, 0 Lips)
true.

All these things get nowhere tested for Ciao Prolog, since it
doesn’t exist. Subsequently also not covered by benchmarks.

@jfmc jfmc added the iso label Nov 28, 2023
@jfmc jfmc reopened this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants