Skip to content

Commit 7fc7b09

Browse files
committed
feat: add comprehensive scaffold metadata to truncbf package.json
- Add detailed parameter specifications with example values (20 per param) - Add domain definitions and random value generators - Add proper schema version (math/base@v1.0) - Include base_alias (truncb) and alias (truncbf) fields - Add test configuration (hermitian: false, symmetric: false) - Complete metadata for automated tooling and documentation
1 parent 8df7b42 commit 7fc7b09

1 file changed

Lines changed: 147 additions & 22 deletions

File tree

  • lib/node_modules/@stdlib/math/base/special/truncbf

lib/node_modules/@stdlib/math/base/special/truncbf/package.json

Lines changed: 147 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,38 +90,163 @@
9090
],
9191
"__stdlib__": {
9292
"scaffold": {
93-
"$schema": "math-v1",
94-
"base": {
95-
"math": true
96-
},
97-
"signatures": [
93+
"$schema": "math/base@v1.0",
94+
"base_alias": "truncb",
95+
"alias": "truncbf",
96+
"pkg_desc": "round a single-precision floating-point number toward zero to n digits in base b",
97+
"desc": "rounds a single-precision floating-point number toward zero to `n` digits in base `b`",
98+
"short_desc": "round a single-precision floating-point number toward zero to n digits in base b",
99+
"parameters": [
98100
{
99-
"params": [
101+
"name": "x",
102+
"desc": "input value",
103+
"type": {
104+
"javascript": "number",
105+
"jsdoc": "number",
106+
"c": "float",
107+
"dtype": "float32"
108+
},
109+
"domain": [
100110
{
101-
"name": "x",
102-
"type": "number",
103-
"description": "input value"
104-
},
105-
{
106-
"name": "n",
107-
"type": "integer",
108-
"description": "number of digits"
109-
},
111+
"min": "-infinity",
112+
"max": "infinity"
113+
}
114+
],
115+
"rand": {
116+
"prng": "random/base/uniform",
117+
"parameters": [
118+
-100,
119+
100
120+
]
121+
},
122+
"example_values": [
123+
3.14159,
124+
-3.14159,
125+
15.0,
126+
-15.0,
127+
123.456,
128+
-123.456,
129+
7.875,
130+
-7.875,
131+
255.99,
132+
-255.99,
133+
0.123456,
134+
-0.123456,
135+
1.23456789,
136+
-1.23456789,
137+
9.999,
138+
-9.999,
139+
20.0,
140+
-20.0,
141+
5.6789,
142+
-5.6789
143+
]
144+
},
145+
{
146+
"name": "n",
147+
"desc": "number of digits",
148+
"type": {
149+
"javascript": "integer",
150+
"jsdoc": "integer",
151+
"c": "int32_t",
152+
"dtype": "int32"
153+
},
154+
"domain": [
110155
{
111-
"name": "b",
112-
"type": "integer",
113-
"description": "base"
156+
"min": "-infinity",
157+
"max": "infinity"
114158
}
115159
],
116-
"returns": [
160+
"rand": {
161+
"prng": "random/base/discrete-uniform",
162+
"parameters": [
163+
-5,
164+
5
165+
]
166+
},
167+
"example_values": [
168+
2,
169+
3,
170+
-1,
171+
0,
172+
1,
173+
4,
174+
-2,
175+
5,
176+
-3,
177+
2,
178+
3,
179+
1,
180+
0,
181+
2,
182+
1,
183+
3,
184+
-2,
185+
2,
186+
1,
187+
2
188+
]
189+
},
190+
{
191+
"name": "b",
192+
"desc": "base",
193+
"type": {
194+
"javascript": "integer",
195+
"jsdoc": "integer",
196+
"c": "int32_t",
197+
"dtype": "int32"
198+
},
199+
"domain": [
117200
{
118-
"type": "number",
119-
"description": "rounded value"
201+
"min": "0",
202+
"max": "infinity"
120203
}
204+
],
205+
"rand": {
206+
"prng": "random/base/discrete-uniform",
207+
"parameters": [
208+
2,
209+
16
210+
]
211+
},
212+
"example_values": [
213+
10,
214+
10,
215+
10,
216+
10,
217+
10,
218+
10,
219+
2,
220+
2,
221+
16,
222+
16,
223+
8,
224+
8,
225+
10,
226+
10,
227+
10,
228+
10,
229+
2,
230+
10,
231+
10,
232+
10
121233
]
122234
}
123235
],
124-
"desc": "rounds a single-precision floating-point number toward zero to `n` digits in base `b`"
236+
"returns": [
237+
{
238+
"type": {
239+
"javascript": "number",
240+
"jsdoc": "number",
241+
"c": "float",
242+
"dtype": "float32"
243+
}
244+
}
245+
],
246+
"tests": {
247+
"hermitian": false,
248+
"symmetric": false
249+
}
125250
}
126251
}
127252
}

0 commit comments

Comments
 (0)