-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Passing x = 0 to format_numbers() produces NaNs in scientific and engineering notation:
format_numbers(0, format = "sci")
#> [1] "$NaN \\times 10^{-Inf}$"
format_numbers(0, format = "engr")
#> [1] "$NaN \\times 10^{-Inf}$"I assume this is because the power is calculated using log10(x). This can be easily avoided using decimal notation:
format_numbers(0, format = "dcml")
#> [1] "$0$"However, it would be convenient to not have to handle zeroes specially, especially when x is programmatically generated and may or may not be 0.
Metadata
Metadata
Assignees
Labels
No labels