Add Support for Arbitrary Precision Arithmetic with BigFloat
See original GitHub issueIs your feature request related to a problem? Please describe. I tried running ‘pysr’ on a 1,000 row array with 4 integer input variables and one integer output variable - a Goedel Number.
From Mathematica:
GoedelNumber[l_List] := Times @@ MapIndexed[Prime[First[#2]]^#1 &, l]
E.g.
Data file:
# 7 1 5 8 6917761200000
julia> 2^7*3^1*5^5*7^8
6917761200000
The model returned:
Complexity Loss Score Equation
1 Inf NaN 0.22984365
I am just learning ‘pysr’ and maybe it’s just ‘user error’. However, Inf and Nan suggest that Goedel numbers may exceed Float64.
Describe the solution you’d like Not sure what happened, because the largest Goedel number in the input is: 1.6679880978201e+23
Additional context I didn’t see any parameters to set ‘verbose’ mode or ‘debugging’ information.
Issue Analytics
- State:
- Created 10 months ago
- Comments:35 (19 by maintainers)
Top Results From Across the Web
The bigfloat package — high precision floating-point arithmetic
The main class, BigFloat, gives an immutable multiple-precision floating-point type ... Support for mixed-type operations with Python integers and floats.
Read more >charto/bigfloat: Fast arbitrary precision math library ... - GitHub
bigfloat is a fast arbitrary precision math library optimized for computational geometry and geoinformatics. It provides binary floating point: conversion to / ...
Read more >Arbitrary Precision Floating-Point Numbers - Documentation
The BigFloat class represents floating-point numbers of arbitrary precision. The range of numbers that can be represented is from roughly 10-646,000,000 to ...
Read more >Math::BigFloat - arbitrary size floating point math package
Math ::BigFloat provides support for arbitrary precision floating point. ... This method was added in v1.87 of Math::BigInt (June 2007).
Read more >bigfloat - PyPI
The bigfloat package is a Python package providing arbitrary-precision correctly-rounded binary floating-point arithmetic. It is implemented as a Cython ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

btw - I showed ‘PYSR’ yesterday to a UCSC Pure Math PhD student. He commented 'this is going to put me out of a job. 😉
Recall that you edited your local copy to convert to BigFloats. Install pysr with
pip install -U pysrto get the normal one back.