-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsgn.json
107 lines (107 loc) · 2.44 KB
/
sgn.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
99
100
101
102
103
104
105
106
107
{
"id": "sgn",
"summary": "Signum",
"description": "The signum (also known as *sign*) of `x` is defined as:\n\n* *1* if *x > 0*\n* *0* if *x = 0*\n* *-1* if *x < 0*\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 signum value of `x`.",
"schema": {
"type": [
"number",
"null"
]
}
},
"examples": [
{
"arguments": {
"x": -2
},
"returns": -1
},
{
"arguments": {
"x": 3.5
},
"returns": 1
},
{
"arguments": {
"x": 0
},
"returns": 0
},
{
"arguments": {
"x": null
},
"returns": null
}
],
"links": [
{
"rel": "about",
"href": "http://mathworld.wolfram.com/Sign.html",
"title": "Sign explained by Wolfram MathWorld"
}
],
"process_graph": {
"gt0": {
"process_id": "gt",
"arguments": {
"x": {
"from_parameter": "x"
},
"y": 0
}
},
"lt0": {
"process_id": "lt",
"arguments": {
"x": {
"from_parameter": "x"
},
"y": 0
}
},
"if_gt0": {
"process_id": "if",
"arguments": {
"value": {
"from_node": "gt0"
},
"accept": 1,
"reject": {
"from_parameter": "x"
}
}
},
"if_lt0": {
"process_id": "if",
"arguments": {
"value": {
"from_node": "lt0"
},
"accept": -1,
"reject": {
"from_node": "if_gt0"
}
},
"result": true
}
}
}