Skip to content

Commit

Permalink
Fix incorrect parsing of named numbers Duodecillion and greater
Browse files Browse the repository at this point in the history
Named numbers `Duodecillion` and greater had an extra zero in them
  • Loading branch information
probablykasper committed Feb 8, 2021
1 parent e4684e7 commit b9a1e13
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": false
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Next
- Fix incorrect parsing of named numbers `Duodecillion` and greater

## 1.3.1 - 2021 Jan 14
- Fix spelling of `Celsius` (@joseluis)

Expand Down
22 changes: 11 additions & 11 deletions src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ pub fn lookup_named_number(named_number: &NamedNumber) -> d128 {
Nonillion => d128!(1000000000000000000000000000000),
Decillion => d128!(1000000000000000000000000000000000),
Undecillion => d128!(1000000000000000000000000000000000000),
Duodecillion => d128!(10E+39),
Tredecillion => d128!(10E+42),
Quattuordecillion => d128!(10E+45),
Quindecillion => d128!(10E+48),
Sexdecillion => d128!(10E+51),
Septendecillion => d128!(10E+54),
Octodecillion => d128!(10E+57),
Novemdecillion => d128!(10E+60),
Vigintillion => d128!(10E+63),
Centillion => d128!(10E+303),
Googol => d128!(10E+100),
Duodecillion => d128!(1E+39),
Tredecillion => d128!(1E+42),
Quattuordecillion => d128!(1E+45),
Quindecillion => d128!(1E+48),
Sexdecillion => d128!(1E+51),
Septendecillion => d128!(1E+54),
Octodecillion => d128!(1E+57),
Novemdecillion => d128!(1E+60),
Vigintillion => d128!(1E+63),
Googol => d128!(1E+100),
Centillion => d128!(1E+303),
}
}

Expand Down

0 comments on commit b9a1e13

Please sign in to comment.