Will do today

--
sent by a bradDroid - please expect bradVity!
On Mar 22, 2014 1:03 AM, "Jag Talon" <notifications@github.com> wrote:

> In lib/DDG/Goodie/Conversions.pm:
>
> > +    }
> > +
> > +    # handle plurals:
> > +    my $result = $factor * ($matches->{'factor_2'} / $matches->{'factor_1'});
> > +    # if $result = 1.00000 .. 000n, where n <> 0 then $result != 1 and throws off pluralization, so:
> > +    $result = nearest(.001, $result);   # .001 to match sprintf "%.3f" below
> > +
> > +    if ($factor != 1) {
> > +        $matches->{'from_unit'} = (exists $plural_exceptions{$matches->{'from_unit'}}) ? $plural_exceptions{$matches->{'from_unit'}} : $matches->{'from_unit'} . 's';
> > +    }
> > +
> > +    if ($result != 1) {
> > +        $matches->{'to_unit'} = (exists $plural_exceptions{$matches->{'to_unit'}}) ? $plural_exceptions{$matches->{'to_unit'}} : $matches->{'to_unit'} . 's';
> > +    }
> > +
> > +    return "$factor $matches->{'from_unit'} is " . sprintf("%.3f", $result) . " $matches->{'to_unit'}";
>
> How hard would it be to display the result in scientific notation when it
> comes to ridiculous calculations such as "10 mg to tons"?
>
> [image: screen shot 2014-03-22 at 1 00 49 am]<https://f.cloud.github.com/assets/81969/2489894/f6f46134-b17e-11e3-91e6-2e16603128a1.png>
>
> The result "0.000" is not what I was expecting. It looks like W|A and
> Google handle this well.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/duckduckgo/zeroclickinfo-goodies/pull/356/files#r10860793>
> .
>