Skip to content

Fails to convert large decimals #1

@geordee

Description

@geordee

For example, 2299111234567890.76.to_words

In Sankhya, to_s function is used to overcome the floating point arithmetic approximations.

2.0.0-p247 :002 > 2299111234567890.76.to_s
 => "2.299111234567891e+15"
2.0.0-p247 :010 > 2299111234567890.76.to_words
 => ["two", "two hundred and ninety nine"]

Specifically, to_s handles up to 2189149675095052.8, before it switches over to scientific notation. Sankhya handles translation till this number correctly, beyond which scientific notation interferes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions