Comments (4)
from trealla.
GNU Prolog doesn't have bigints. These Prolog systems
cannot realize (^)/2 correctly. You can try yourself the
ISO core standard Prolog flag "bounded", where
"true = no bigints" and "false = bigints":
?- current_prolog_flag(bounded, X).
X = true
Or alternatively you can try:
/* GNU Prolog 1.5.0 */
?- X is 51^20-1.
uncaught exception: error(evaluation_error(int_overflow),(is)/2)
from trealla.
Your result is probably a conversion back to integer
from float. To see that you need a precise float to
bigint conversion, which shows me that:
?- X is integer(1.1904242382761301E17).
X = 119042423827613008.
But the computation of a float is not that precise
as the computation of a bigint. Thats where the
precision is lost, and why the integer result shown
is not correct.
from trealla.
As already mentioned in another ticket, the error is gone.
For example it is now:
Trealla Prolog (c) Infradig 2020-2022, v2.7.15
?- X is 39^9, Y is 39*39*39*39*39*39*39*39*39.
X = 208728361158759, Y = X.
Closing this ticket.
from trealla.
Related Issues (20)
- Segmentation Dump with NOFFI=1 NOSSL=1 NOTHREADS=1 ISOCLINE=1 Enabled HOT 1
- arg/3 + string weirdness HOT 2
- freeze/2 not playing well with negation HOT 6
- Module visibility for attributes incorrect? HOT 2
- Callligraphic script not unparsed like it is parsed?
- matrix: mat_lup_det/2 segfault HOT 4
- Apropos reading/writing. Trying to read from a named pipe: HOT 4
- Loading nonexistent shared lib should be an error HOT 10
- GSL: Error handling HOT 4
- GSL: matrix no-size (0x0) segfault HOT 4
- GSL: Info+Question HOT 14
- Support CLP(B) HOT 10
- Superflous parenthesis for fy mode HOT 3
- GSL: wrong sized matrix segfault
- GSL: library/gsl.pl hard-coded size
- GSL: result inoperative HOT 12
- pl_yield_at can cause some undesirable side effects HOT 10
- getting answers that are just a variable HOT 7
- [] not an atom that can be used as an operator HOT 10
- GSL: Bugs HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trealla.