@stdlib/math-base-napi-unary 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/NOTICE +1 -1
  2. package/README.md +710 -144
  3. package/include/stdlib/math/base/napi/unary/b_b.h +84 -0
  4. package/include/stdlib/math/base/napi/unary/c_c.h +93 -0
  5. package/include/stdlib/math/base/napi/unary/c_f.h +84 -0
  6. package/include/stdlib/math/base/napi/unary/d_d.h +81 -0
  7. package/include/stdlib/math/base/napi/unary/d_f.h +81 -0
  8. package/include/stdlib/math/base/napi/unary/f_f.h +81 -0
  9. package/include/stdlib/math/base/napi/unary/f_i.h +84 -0
  10. package/include/stdlib/math/base/napi/unary/h_h.h +84 -0
  11. package/include/stdlib/math/base/napi/unary/i_d.h +84 -0
  12. package/include/stdlib/math/base/napi/unary/i_f.h +84 -0
  13. package/include/stdlib/math/base/napi/unary/i_i.h +84 -0
  14. package/include/stdlib/math/base/napi/unary/k_k.h +84 -0
  15. package/include/stdlib/math/base/napi/unary/s_s.h +84 -0
  16. package/include/stdlib/math/base/napi/unary/t_t.h +84 -0
  17. package/include/stdlib/math/base/napi/unary/u_u.h +84 -0
  18. package/include/stdlib/math/base/napi/unary/z_d.h +84 -0
  19. package/include/stdlib/math/base/napi/unary/z_z.h +93 -0
  20. package/include/stdlib/math/base/napi/unary.h +18 -406
  21. package/manifest.json +56 -37
  22. package/package.json +8 -10
  23. package/src/b_b.c +71 -0
  24. package/src/c_c.c +129 -0
  25. package/src/c_f.c +109 -0
  26. package/src/d_d.c +69 -0
  27. package/src/d_f.c +69 -0
  28. package/src/f_f.c +69 -0
  29. package/src/f_i.c +70 -0
  30. package/src/h_h.c +74 -0
  31. package/src/i_d.c +70 -0
  32. package/src/i_f.c +70 -0
  33. package/src/i_i.c +70 -0
  34. package/src/k_k.c +70 -0
  35. package/src/s_s.c +71 -0
  36. package/src/t_t.c +70 -0
  37. package/src/u_u.c +70 -0
  38. package/src/z_d.c +109 -0
  39. package/src/z_z.c +129 -0
  40. package/src/main.c +0 -601
package/src/main.c DELETED
@@ -1,601 +0,0 @@
1
- /**
2
- * @license Apache-2.0
3
- *
4
- * Copyright (c) 2020 The Stdlib Authors.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- #include "stdlib/math/base/napi/unary.h"
20
- #include "stdlib/complex/float64/ctor.h"
21
- #include "stdlib/complex/float32/ctor.h"
22
- #include "stdlib/complex/float64/reim.h"
23
- #include "stdlib/complex/float32/reim.h"
24
- #include <node_api.h>
25
- #include <stdint.h>
26
- #include <assert.h>
27
- #include <stdbool.h>
28
-
29
- /**
30
- * Invokes a unary function accepting and returning double-precision floating-point numbers.
31
- *
32
- * ## Notes
33
- *
34
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
35
- *
36
- * - `x`: input value.
37
- *
38
- * @param env environment under which the function is invoked
39
- * @param info callback data
40
- * @param fcn unary function
41
- * @return function return value as a Node-API double-precision floating-point number
42
- */
43
- napi_value stdlib_math_base_napi_d_d( napi_env env, napi_callback_info info, double (*fcn)( double ) ) {
44
- napi_status status;
45
-
46
- size_t argc = 1;
47
- napi_value argv[ 1 ];
48
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
49
- assert( status == napi_ok );
50
-
51
- if ( argc < 1 ) {
52
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a number." );
53
- assert( status == napi_ok );
54
- return NULL;
55
- }
56
-
57
- napi_valuetype vtype0;
58
- status = napi_typeof( env, argv[ 0 ], &vtype0 );
59
- assert( status == napi_ok );
60
- if ( vtype0 != napi_number ) {
61
- status = napi_throw_type_error( env, NULL, "invalid argument. Must provide a number." );
62
- assert( status == napi_ok );
63
- return NULL;
64
- }
65
-
66
- double x;
67
- status = napi_get_value_double( env, argv[ 0 ], &x );
68
- assert( status == napi_ok );
69
-
70
- napi_value v;
71
- status = napi_create_double( env, fcn( x ), &v );
72
- assert( status == napi_ok );
73
-
74
- return v;
75
- }
76
-
77
- /**
78
- * Invokes a unary function accepting and returning single-precision floating-point numbers.
79
- *
80
- * ## Notes
81
- *
82
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
83
- *
84
- * - `x`: input value.
85
- *
86
- * @param env environment under which the function is invoked
87
- * @param info callback data
88
- * @param fcn unary function
89
- * @return function return value as a Node-API double-precision floating-point number
90
- */
91
- napi_value stdlib_math_base_napi_f_f( napi_env env, napi_callback_info info, float (*fcn)( float ) ) {
92
- napi_status status;
93
-
94
- size_t argc = 1;
95
- napi_value argv[ 1 ];
96
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
97
- assert( status == napi_ok );
98
-
99
- if ( argc < 1 ) {
100
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a number." );
101
- assert( status == napi_ok );
102
- return NULL;
103
- }
104
-
105
- napi_valuetype vtype0;
106
- status = napi_typeof( env, argv[ 0 ], &vtype0 );
107
- assert( status == napi_ok );
108
- if ( vtype0 != napi_number ) {
109
- status = napi_throw_type_error( env, NULL, "invalid argument. Must provide a number." );
110
- assert( status == napi_ok );
111
- return NULL;
112
- }
113
-
114
- double x;
115
- status = napi_get_value_double( env, argv[ 0 ], &x );
116
- assert( status == napi_ok );
117
-
118
- napi_value v;
119
- status = napi_create_double( env, (double)fcn( (float)x ), &v );
120
- assert( status == napi_ok );
121
-
122
- return v;
123
- }
124
-
125
- /**
126
- * Invokes a unary function accepting and returning double-precision complex floating-point numbers.
127
- *
128
- * ## Notes
129
- *
130
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
131
- *
132
- * - `x`: input value.
133
- *
134
- * @param env environment under which the function is invoked
135
- * @param info callback data
136
- * @param fcn unary function
137
- * @return function return value as a Node-API complex-like object
138
- */
139
- napi_value stdlib_math_base_napi_z_z( napi_env env, napi_callback_info info, stdlib_complex128_t (*fcn)( stdlib_complex128_t ) ) {
140
- napi_status status;
141
-
142
- size_t argc = 1;
143
- napi_value argv[ 1 ];
144
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
145
- assert( status == napi_ok );
146
-
147
- if ( argc < 1 ) {
148
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a complex number." );
149
- assert( status == napi_ok );
150
- return NULL;
151
- }
152
-
153
- bool hprop;
154
- status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
155
- assert( status == napi_ok );
156
- if ( !hprop ) {
157
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component." );
158
- assert( status == napi_ok );
159
- return NULL;
160
- }
161
-
162
- napi_value xre;
163
- status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
164
- assert( status == napi_ok );
165
-
166
- napi_valuetype xretype;
167
- status = napi_typeof( env, xre, &xretype );
168
- assert( status == napi_ok );
169
- if ( xretype != napi_number ) {
170
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component which is a number." );
171
- assert( status == napi_ok );
172
- return NULL;
173
- }
174
-
175
- status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
176
- assert( status == napi_ok );
177
- if ( !hprop ) {
178
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component." );
179
- assert( status == napi_ok );
180
- return NULL;
181
- }
182
-
183
- napi_value xim;
184
- status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
185
- assert( status == napi_ok );
186
-
187
- napi_valuetype ximtype;
188
- status = napi_typeof( env, xim, &ximtype );
189
- assert( status == napi_ok );
190
- if ( ximtype != napi_number ) {
191
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component which a number." );
192
- assert( status == napi_ok );
193
- return NULL;
194
- }
195
-
196
- double re0;
197
- status = napi_get_value_double( env, xre, &re0 );
198
- assert( status == napi_ok );
199
-
200
- double im0;
201
- status = napi_get_value_double( env, xim, &im0 );
202
- assert( status == napi_ok );
203
-
204
- stdlib_complex128_t v = fcn( stdlib_complex128( re0, im0 ) );
205
- double re;
206
- double im;
207
- stdlib_complex128_reim( v, &re, &im );
208
-
209
- napi_value obj;
210
- status = napi_create_object( env, &obj );
211
- assert( status == napi_ok );
212
-
213
- napi_value vre;
214
- status = napi_create_double( env, re, &vre );
215
- assert( status == napi_ok );
216
-
217
- status = napi_set_named_property( env, obj, "re", vre );
218
- assert( status == napi_ok );
219
-
220
- napi_value vim;
221
- status = napi_create_double( env, im, &vim );
222
- assert( status == napi_ok );
223
-
224
- status = napi_set_named_property( env, obj, "im", vim );
225
- assert( status == napi_ok );
226
-
227
- return obj;
228
- }
229
-
230
- /**
231
- * Invokes a unary function accepting a double-precision complex floating-point number and returning a double-precision floating-point number.
232
- *
233
- * ## Notes
234
- *
235
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
236
- *
237
- * - `x`: input value.
238
- *
239
- * @param env environment under which the function is invoked
240
- * @param info callback data
241
- * @param fcn unary function
242
- * @return function return value as a Node-API complex-like object
243
- */
244
- napi_value stdlib_math_base_napi_z_d( napi_env env, napi_callback_info info, double (*fcn)( stdlib_complex128_t ) ) {
245
- napi_status status;
246
-
247
- size_t argc = 1;
248
- napi_value argv[ 1 ];
249
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
250
- assert( status == napi_ok );
251
-
252
- if ( argc < 1 ) {
253
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a complex number." );
254
- assert( status == napi_ok );
255
- return NULL;
256
- }
257
-
258
- bool hprop;
259
- status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
260
- assert( status == napi_ok );
261
- if ( !hprop ) {
262
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component." );
263
- assert( status == napi_ok );
264
- return NULL;
265
- }
266
-
267
- napi_value xre;
268
- status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
269
- assert( status == napi_ok );
270
-
271
- napi_valuetype xretype;
272
- status = napi_typeof( env, xre, &xretype );
273
- assert( status == napi_ok );
274
- if ( xretype != napi_number ) {
275
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component which is a number." );
276
- assert( status == napi_ok );
277
- return NULL;
278
- }
279
-
280
- status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
281
- assert( status == napi_ok );
282
- if ( !hprop ) {
283
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component." );
284
- assert( status == napi_ok );
285
- return NULL;
286
- }
287
-
288
- napi_value xim;
289
- status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
290
- assert( status == napi_ok );
291
-
292
- napi_valuetype ximtype;
293
- status = napi_typeof( env, xim, &ximtype );
294
- assert( status == napi_ok );
295
- if ( ximtype != napi_number ) {
296
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component which a number." );
297
- assert( status == napi_ok );
298
- return NULL;
299
- }
300
-
301
- double re;
302
- status = napi_get_value_double( env, xre, &re );
303
- assert( status == napi_ok );
304
-
305
- double im;
306
- status = napi_get_value_double( env, xim, &im );
307
- assert( status == napi_ok );
308
-
309
- napi_value v;
310
- status = napi_create_double( env, fcn( stdlib_complex128( re, im ) ), &v );
311
- assert( status == napi_ok );
312
-
313
- return v;
314
- }
315
-
316
- /**
317
- * Invokes a unary function accepting and returning single-precision complex floating-point numbers.
318
- *
319
- * ## Notes
320
- *
321
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
322
- *
323
- * - `x`: input value.
324
- *
325
- * @param env environment under which the function is invoked
326
- * @param info callback data
327
- * @param fcn unary function
328
- * @return function return value as a Node-API complex-like object
329
- */
330
- napi_value stdlib_math_base_napi_c_c( napi_env env, napi_callback_info info, stdlib_complex64_t (*fcn)( stdlib_complex64_t ) ) {
331
- napi_status status;
332
-
333
- size_t argc = 1;
334
- napi_value argv[ 1 ];
335
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
336
- assert( status == napi_ok );
337
-
338
- if ( argc < 1 ) {
339
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a complex number." );
340
- assert( status == napi_ok );
341
- return NULL;
342
- }
343
-
344
- bool hprop;
345
- status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
346
- assert( status == napi_ok );
347
- if ( !hprop ) {
348
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component." );
349
- assert( status == napi_ok );
350
- return NULL;
351
- }
352
-
353
- napi_value xre;
354
- status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
355
- assert( status == napi_ok );
356
-
357
- napi_valuetype xretype;
358
- status = napi_typeof( env, xre, &xretype );
359
- assert( status == napi_ok );
360
- if ( xretype != napi_number ) {
361
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component which is a number." );
362
- assert( status == napi_ok );
363
- return NULL;
364
- }
365
-
366
- status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
367
- assert( status == napi_ok );
368
- if ( !hprop ) {
369
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component." );
370
- assert( status == napi_ok );
371
- return NULL;
372
- }
373
-
374
- napi_value xim;
375
- status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
376
- assert( status == napi_ok );
377
-
378
- napi_valuetype ximtype;
379
- status = napi_typeof( env, xim, &ximtype );
380
- assert( status == napi_ok );
381
- if ( ximtype != napi_number ) {
382
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component which a number." );
383
- assert( status == napi_ok );
384
- return NULL;
385
- }
386
-
387
- double re0;
388
- status = napi_get_value_double( env, xre, &re0 );
389
- assert( status == napi_ok );
390
-
391
- double im0;
392
- status = napi_get_value_double( env, xim, &im0 );
393
- assert( status == napi_ok );
394
-
395
- stdlib_complex64_t v = fcn( stdlib_complex64( (float)re0, (float)im0 ) );
396
- float re;
397
- float im;
398
- stdlib_complex64_reim( v, &re, &im );
399
-
400
- napi_value obj;
401
- status = napi_create_object( env, &obj );
402
- assert( status == napi_ok );
403
-
404
- napi_value vre;
405
- status = napi_create_double( env, (double)re, &vre );
406
- assert( status == napi_ok );
407
-
408
- status = napi_set_named_property( env, obj, "re", vre );
409
- assert( status == napi_ok );
410
-
411
- napi_value vim;
412
- status = napi_create_double( env, (double)im, &vim );
413
- assert( status == napi_ok );
414
-
415
- status = napi_set_named_property( env, obj, "im", vim );
416
- assert( status == napi_ok );
417
-
418
- return obj;
419
- }
420
-
421
- /**
422
- * Invokes a unary function accepting a single-precision complex floating-point number and returning a single-precision floating-point number.
423
- *
424
- * ## Notes
425
- *
426
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
427
- *
428
- * - `x`: input value.
429
- *
430
- * @param env environment under which the function is invoked
431
- * @param info callback data
432
- * @param fcn unary function
433
- * @return function return value as a Node-API complex-like object
434
- */
435
- napi_value stdlib_math_base_napi_c_f( napi_env env, napi_callback_info info, float (*fcn)( stdlib_complex64_t ) ) {
436
- napi_status status;
437
-
438
- size_t argc = 1;
439
- napi_value argv[ 1 ];
440
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
441
- assert( status == napi_ok );
442
-
443
- if ( argc < 1 ) {
444
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a complex number." );
445
- assert( status == napi_ok );
446
- return NULL;
447
- }
448
-
449
- bool hprop;
450
- status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
451
- assert( status == napi_ok );
452
- if ( !hprop ) {
453
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component." );
454
- assert( status == napi_ok );
455
- return NULL;
456
- }
457
-
458
- napi_value xre;
459
- status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
460
- assert( status == napi_ok );
461
-
462
- napi_valuetype xretype;
463
- status = napi_typeof( env, xre, &xretype );
464
- assert( status == napi_ok );
465
- if ( xretype != napi_number ) {
466
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have a real component which is a number." );
467
- assert( status == napi_ok );
468
- return NULL;
469
- }
470
-
471
- status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
472
- assert( status == napi_ok );
473
- if ( !hprop ) {
474
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component." );
475
- assert( status == napi_ok );
476
- return NULL;
477
- }
478
-
479
- napi_value xim;
480
- status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
481
- assert( status == napi_ok );
482
-
483
- napi_valuetype ximtype;
484
- status = napi_typeof( env, xim, &ximtype );
485
- assert( status == napi_ok );
486
- if ( ximtype != napi_number ) {
487
- status = napi_throw_type_error( env, NULL, "invalid argument. Argument must have an imaginary component which a number." );
488
- assert( status == napi_ok );
489
- return NULL;
490
- }
491
-
492
- double re;
493
- status = napi_get_value_double( env, xre, &re );
494
- assert( status == napi_ok );
495
-
496
- double im;
497
- status = napi_get_value_double( env, xim, &im );
498
- assert( status == napi_ok );
499
-
500
- napi_value v;
501
- status = napi_create_double( env, (double)fcn( stdlib_complex64( (float)re, (float)im ) ), &v );
502
- assert( status == napi_ok );
503
-
504
- return v;
505
- }
506
-
507
- /**
508
- * Invokes a unary function accepting and returning signed 32-bit integers.
509
- *
510
- * ## Notes
511
- *
512
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
513
- *
514
- * - `x`: input value.
515
- *
516
- * @param env environment under which the function is invoked
517
- * @param info callback data
518
- * @param fcn unary function
519
- * @return function return value as a Node-API signed 32-bit integer
520
- */
521
- napi_value stdlib_math_base_napi_i_i( napi_env env, napi_callback_info info, int32_t (*fcn)( int32_t ) ) {
522
- napi_status status;
523
-
524
- size_t argc = 1;
525
- napi_value argv[ 1 ];
526
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
527
- assert( status == napi_ok );
528
-
529
- if ( argc < 1 ) {
530
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a number." );
531
- assert( status == napi_ok );
532
- return NULL;
533
- }
534
-
535
- napi_valuetype vtype0;
536
- status = napi_typeof( env, argv[ 0 ], &vtype0 );
537
- assert( status == napi_ok );
538
- if ( vtype0 != napi_number ) {
539
- status = napi_throw_type_error( env, NULL, "invalid argument. Must provide a number." );
540
- assert( status == napi_ok );
541
- return NULL;
542
- }
543
-
544
- int32_t x;
545
- status = napi_get_value_int32( env, argv[ 0 ], &x );
546
- assert( status == napi_ok );
547
-
548
- napi_value v;
549
- status = napi_create_int32( env, fcn( x ), &v );
550
- assert( status == napi_ok );
551
-
552
- return v;
553
- }
554
-
555
- /**
556
- * Invokes a unary function accepting a signed 32-bit integer and returning a single-precision floating-point number.
557
- *
558
- * ## Notes
559
- *
560
- * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
561
- *
562
- * - `x`: input value.
563
- *
564
- * @param env environment under which the function is invoked
565
- * @param info callback data
566
- * @param fcn unary function
567
- * @return function return value as a Node-API double-precision floating-point number
568
- */
569
- napi_value stdlib_math_base_napi_i_d( napi_env env, napi_callback_info info, double (*fcn)( int32_t ) ) {
570
- napi_status status;
571
-
572
- size_t argc = 1;
573
- napi_value argv[ 1 ];
574
- status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
575
- assert( status == napi_ok );
576
-
577
- if ( argc < 1 ) {
578
- status = napi_throw_error( env, NULL, "invalid invocation. Must provide a number." );
579
- assert( status == napi_ok );
580
- return NULL;
581
- }
582
-
583
- napi_valuetype vtype0;
584
- status = napi_typeof( env, argv[ 0 ], &vtype0 );
585
- assert( status == napi_ok );
586
- if ( vtype0 != napi_number ) {
587
- status = napi_throw_type_error( env, NULL, "invalid argument. Must provide a number." );
588
- assert( status == napi_ok );
589
- return NULL;
590
- }
591
-
592
- int32_t x;
593
- status = napi_get_value_int32( env, argv[ 0 ], &x );
594
- assert( status == napi_ok );
595
-
596
- napi_value v;
597
- status = napi_create_double( env, fcn( x ), &v );
598
- assert( status == napi_ok );
599
-
600
- return v;
601
- }