Skip to content

Commit 01afda3

Browse files
authored
Merge pull request #49 from jakewilliami/irrational
Added method handling irrational numbers (closes #38, but open questi…
2 parents b5cc598 + 2203a07 commit 01afda3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/en.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ function spelled_out_en(number::Rational; british::Bool = false, dict::Symbol =
213213
return isone(_num) ? word : word * "s"
214214
end
215215

216+
function spelled_out_en(number::AbstractIrrational; british::Bool = false, dict::Symbol = :modern)
217+
throw(error("Please round the input number, as we support floating point printing but cannot support irrational printing."))
218+
end
216219

217220
# Fallback method if we do not know how to handle the input
218221
function spelled_out_en(number; british::Bool = false, dict::Symbol = :modern)

0 commit comments

Comments
 (0)