question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Support for Arbitrary Precision Arithmetic with BigFloat

See original GitHub issue

Is 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.

Screenshot 2022-12-01 at 8 33 44 AM

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.

GoedelTableFourParameters.txt

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:35 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
dbl001commented, Dec 6, 2022

btw - I showed ‘PYSR’ yesterday to a UCSC Pure Math PhD student. He commented 'this is going to put me out of a job. 😉

0reactions
MilesCranmercommented, Dec 13, 2022

Recall that you edited your local copy to convert to BigFloats. Install pysr with pip install -U pysr to get the normal one back.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found