Spelling of ordinal numbers: Difference between revisions

Content added Content deleted
(→‎{{header|jq}}: vigintillion)
(→‎{{header|jq}}: Remove ###)
Line 957: Line 957:
9007199254740993, # too large for jq
9007199254740993, # too large for jq
# 1e63 is vigintillion so gojq should be able to handle 999 * 1e63
# 1e63 is vigintillion so gojq should be able to handle 999 * 1e63
999000000000000000000000000000000000000000000000000000000000000000,
999000000000000000000000000000000000000000000000000000000000000000,
# ... but not 1000 vigintillion
# ... but not 1000 vigintillion
1000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000
)
)
| "\(lpad(10)) => \(sayOrdinal)"
| "\(lpad(10)) => \(sayOrdinal)"
</syntaxhighlight>
</syntaxhighlight>
{{output}}
The output using gojq is shown first. The tail of the output
The output using gojq is shown first. The tail of the output
using jq is then shown to illustrate what happens when the program
using jq is then shown to illustrate what happens when the program
determines the given integer is too large for jq's built-in support
determines the given integer is too large for jq's built-in support
for integer arithmetic.
for integer arithmetic.

{{output}}
### gojq
'''Using gojq'''
<pre>
<pre>
1 => first
1 => first
Line 990: Line 991:
gojq: error: 66 zeros is beyond the scope of this exercise
gojq: error: 66 zeros is beyond the scope of this exercise
</pre>
</pre>
### Tail of output using the C implementation
'''Tail of output using the C implementation'''
<pre>
<pre>
2000000000000 => two trillionth
2000000000000 => two trillionth