-
Notifications
You must be signed in to change notification settings - Fork 17
/
absolute.json
98 lines (98 loc) · 2.27 KB
/
absolute.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"id": "absolute",
"summary": "Absolute value",
"description": "Computes the absolute value of a real number `x`, which is the \"unsigned\" portion of x and often denoted as *|x|*.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
"categories": [
"math"
],
"parameters": [
{
"name": "x",
"description": "A number.",
"schema": {
"type": [
"number",
"null"
]
}
}
],
"returns": {
"description": "The computed absolute value.",
"schema": {
"type": [
"number",
"null"
],
"minimum": 0
}
},
"examples": [
{
"arguments": {
"x": 0
},
"returns": 0
},
{
"arguments": {
"x": 3.5
},
"returns": 3.5
},
{
"arguments": {
"x": -0.4
},
"returns": 0.4
},
{
"arguments": {
"x": -3.5
},
"returns": 3.5
}
],
"links": [
{
"rel": "about",
"href": "http://mathworld.wolfram.com/AbsoluteValue.html",
"title": "Absolute value explained by Wolfram MathWorld"
}
],
"process_graph": {
"lt": {
"process_id": "lt",
"arguments": {
"x": {
"from_parameter": "x"
},
"y": 0
}
},
"multiply": {
"process_id": "multiply",
"arguments": {
"x": {
"from_parameter": "x"
},
"y": -1
}
},
"if": {
"process_id": "if",
"arguments": {
"value": {
"from_node": "lt"
},
"accept": {
"from_node": "multiply"
},
"reject": {
"from_parameter": "x"
}
},
"result": true
}
}
}