builtin.jq: naive abs/0
manual.yml explains that the def is naive, and mentions fabs, etc.
This commit is contained in:
1 parent
3a1ba0c42d
commit
7b725378b9
5 files changed
+53
No files matched your search
@@ -1808,6 +1808,18 @@ false
|
||||
1
|
||||
1
|
||||
|
||||
# abs, fabs, length
|
||||
abs
|
||||
"abc"
|
||||
"abc"
|
||||
|
||||
map(abs)
|
||||
[-10, -1.1, -1e-1, 1000000000000000002]
|
||||
[10,1.1,0.1,1000000000000000002]
|
||||
|
||||
map(fabs == length) | unique[0]
|
||||
[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]
|
||||
true
|
||||
|
||||
# Using a keyword as variable/label name
|
||||
|
||||
|
||||
Generated
+4
@@ -188,6 +188,10 @@ null
|
||||
1
|
||||
-1
|
||||
|
||||
map(abs)
|
||||
[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]
|
||||
[10,1.1,1e-1,10000000000000002,1e+18]
|
||||
|
||||
.[] | length
|
||||
[[1,2], "string", {"a":2}, null, -5]
|
||||
2
|
||||
|
||||
Reference in new issue
Block a user