Skip Menu |

This queue is for tickets about the Lingua-EN-Numbers CPAN distribution.

Report information
The Basics
Id: 49956
Status: resolved
Priority: 0/
Queue: Lingua-EN-Numbers

People
Owner: Nobody in particular
Requestors: sflitman [...] xenoscience.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: 1.03



Subject: module fails with very large cardinals
perl -Mbigint -MLingua::EN::Numbers=num2en -e 'print num2en(10**10)' ten billion perl -Mbigint -MLingua::EN::Numbers=num2en -e 'print num2en(10**100)' ten times ten to the zeroth It seems not to be able to handle anything over nonillion (1E30), which is fine, but it should then use appropriate exponential notation.
From: bkb [...] cpan.org
On Wed Sep 23 17:25:34 2009, sflitman wrote: Show quoted text
> perl -Mbigint -MLingua::EN::Numbers=num2en -e 'print num2en(10**10)' > ten billion > > > perl -Mbigint -MLingua::EN::Numbers=num2en -e 'print num2en(10**100)' > ten times ten to the zeroth > > It seems not to be able to handle anything over nonillion (1E30),
which Show quoted text
> is fine, but it should then use appropriate exponential notation. >
This is a bug in _groupify. The final line reads return "$basic " . "times ten to the " . num2en_ordinal($basic * 3); but it should read return "$basic " . "times ten to the " . num2en_ordinal($multnum * 3); A fixed version of the module is here: https://github.com/benkasminbullock/Lingua-EN-Numbers
Subject: Re: [rt.cpan.org #49956] module fails with very large cardinals
Date: Mon, 15 Aug 2011 20:59:34 -0700
To: bug-Lingua-EN-Numbers [...] rt.cpan.org
From: "Steve Flitman, MD" <sflitman [...] xenoscience.com>
On 8/14/2011 6:41 PM, Ben Bullock via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=49956> > > On Wed Sep 23 17:25:34 2009, sflitman wrote:
>> perl -Mbigint -MLingua::EN::Numbers=num2en -e 'print num2en(10**10)' >> ten billion >> >> >> perl -Mbigint -MLingua::EN::Numbers=num2en -e 'print num2en(10**100)' >> ten times ten to the zeroth >> >> It seems not to be able to handle anything over nonillion (1E30),
> which
>> is fine, but it should then use appropriate exponential notation. >>
> This is a bug in _groupify. The final line reads > > return "$basic " . "times ten to the " . num2en_ordinal($basic * 3); > > but it should read > > return "$basic " . "times ten to the " . num2en_ordinal($multnum * 3); > > A fixed version of the module is here: > > https://github.com/benkasminbullock/Lingua-EN-Numbers > >
Thank you! Will this be on CPAN? I have autoupdate for about a nonillion servers... SSF