1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Document math support

This commit is contained in:
Nicolas Williams
2015-07-03 21:19:01 -05:00
parent 1c350c67d7
commit a2a6f2d896

View File

@@ -2476,6 +2476,24 @@ sections:
input: '1' input: '1'
output: ['[1,2,4,8,16,32,64]'] output: ['[1,2,4,8,16,32,64]']
- title: 'Math'
body: |
jq currently only has IEEE754 double-precision (64-bit) floating
point number support.
Besides simple arithmetic operators such as `+`, jq also has most
standard math functions from the C math library. C math functions
that take a single input argument (e.g., `sin()`) are available as
zero-argument jq functions. C math functions that take two input
arguments (e.g., `pow()`) are available as two-argument jq
functions that ignore `.`.
Availability of standard math functions depends on the
availability of the corresponding math functions in your operating
system and C math library. Unavailable math functions will be
defined but will raise an error.
- title: 'I/O' - title: 'I/O'
body: | body: |