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

B::Deparse.pm troublesome expression for infinity #14380

Open
p5pRT opened this issue Dec 31, 2014 · 5 comments
Open

B::Deparse.pm troublesome expression for infinity #14380

p5pRT opened this issue Dec 31, 2014 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 31, 2014

Migrated from rt.perl.org#123526 (status was 'open')

Searchable as RT123526$

@p5pRT
Copy link
Author

p5pRT commented Dec 31, 2014

From @tromp

Module B​::Deparse.pm uses 9**9**9 to denote infinity.

This causes our Perl code, which happens to install a floating point
overflow handler through MkSwig'ed C-code, to crash.

Writing 1/0 instead of 9**9**9 avoids this problem, and would
seem to be the preferred notation for (positive) infinity.

Could we have all uses of 9**9**9 replaced with 1/0 ?

using /usr/local/products/perl/5.16.0/lib/4.16.0/B/Deparse.pm
with perl version​: 5.16.0
on OS​: Linux 3.11.10-21-default x86_64

@p5pRT
Copy link
Author

p5pRT commented Dec 31, 2014

From @mauke

Am 31.12.2014 um 03​:14 schrieb John Tromp (via RT)​:

# New Ticket Created by John Tromp
# Please include the string​: [perl #123526]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123526 >

Module B​::Deparse.pm uses 9**9**9 to denote infinity.

This causes our Perl code, which happens to install a floating point
overflow handler through MkSwig'ed C-code, to crash.

Writing 1/0 instead of 9**9**9 avoids this problem, and would
seem to be the preferred notation for (positive) infinity.

Could we have all uses of 9**9**9 replaced with 1/0 ?

using /usr/local/products/perl/5.16.0/lib/4.16.0/B/Deparse.pm
with perl version​: 5.16.0
on OS​: Linux 3.11.10-21-default x86_64

But 1/0 isn't infinity in Perl; it throws an exception. Maybe 0 + 'inf'
would be a better choice.

--
Lukas Mai <plokinom@​gmail.com>

@p5pRT
Copy link
Author

p5pRT commented Dec 31, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 1, 2015

From @cpansprout

On Wed Dec 31 01​:01​:31 2014, plokinom@​gmail.com wrote​:

Am 31.12.2014 um 03​:14 schrieb John Tromp (via RT)​:

# New Ticket Created by John Tromp
# Please include the string​: [perl #123526]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123526 >

Module B​::Deparse.pm uses 9**9**9 to denote infinity.

This causes our Perl code, which happens to install a floating point
overflow handler through MkSwig'ed C-code, to crash.

Writing 1/0 instead of 9**9**9 avoids this problem, and would
seem to be the preferred notation for (positive) infinity.

Could we have all uses of 9**9**9 replaced with 1/0 ?

using /usr/local/products/perl/5.16.0/lib/4.16.0/B/Deparse.pm
with perl version​: 5.16.0
on OS​: Linux 3.11.10-21-default x86_64

But 1/0 isn't infinity in Perl; it throws an exception. Maybe 0 + 'inf'
would be a better choice.

We could default to 0+'inf' (or 9**9**9) and make it configurable, just as we make '???' configurable.

--

Father Chrysostomos

@tromp
Copy link

tromp commented Jan 31, 2020

Agreed; 0+'inf' is much less arbitrary, and therefore prefereable to 999.

@xenu xenu removed the Severity Low label Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants