This repository was archived by the owner on Jun 9, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 69
69
atan2
70
70
ceil
71
71
cos
72
+ cosh
72
73
deg
73
74
exp
74
75
floor
85
86
random
86
87
randomseed
87
88
sin
89
+ sinh
88
90
sqrt
89
91
tan
92
+ tanh
90
93
LIST
91
94
lua_register ($P1 , _math , $P2 )
92
95
@@ -204,6 +207,16 @@ LIST
204
207
.end
205
208
206
209
210
+ . sub ' cosh'
211
+ .param pmc x :optional
212
+ .param pmc extra :slurpy
213
+ .local pmc res
214
+ lua_checknumber (1, x )
215
+ res = x . ' cosh' ()
216
+ .return (res )
217
+ .end
218
+
219
+
207
220
. sub ' deg'
208
221
.param pmc x :optional
209
222
.param pmc extra :slurpy
@@ -455,6 +468,16 @@ LIST
455
468
.end
456
469
457
470
471
+ . sub ' sinh'
472
+ .param pmc x :optional
473
+ .param pmc extra :slurpy
474
+ .local pmc res
475
+ lua_checknumber (1, x )
476
+ res = x . ' sinh' ()
477
+ .return (res )
478
+ .end
479
+
480
+
458
481
. sub ' sqrt'
459
482
.param pmc x :optional
460
483
.param pmc extra :slurpy
@@ -479,6 +502,16 @@ LIST
479
502
.end
480
503
481
504
505
+ . sub ' tanh'
506
+ .param pmc x :optional
507
+ .param pmc extra :slurpy
508
+ .local pmc res
509
+ lua_checknumber (1, x )
510
+ res = x . ' tanh' ()
511
+ .return (res )
512
+ .end
513
+
514
+
482
515
# Local Variables:
483
516
# mode: pir
484
517
# fill-column: 100
Original file line number Diff line number Diff line change @@ -987,6 +987,20 @@ Used to unarchive the number.
987
987
988
988
/*
989
989
990
+ =item C<PMC* cosh()>
991
+
992
+ =cut
993
+
994
+ */
995
+ METHOD PMC* cosh() {
996
+ const FLOATVAL n = cosh(VTABLE_get_number(INTERP, SELF));
997
+ PMC * const retval = pmc_new(INTERP, dynpmc_LuaNumber);
998
+ VTABLE_set_number_native(INTERP, retval, n);
999
+ RETURN(PMC *retval);
1000
+ }
1001
+
1002
+ /*
1003
+
990
1004
=item C<PMC* erf()>
991
1005
992
1006
=cut
@@ -1461,6 +1475,34 @@ Used to unarchive the number.
1461
1475
1462
1476
/*
1463
1477
1478
+ =item C<PMC* sinh()>
1479
+
1480
+ =cut
1481
+
1482
+ */
1483
+ METHOD PMC* sinh() {
1484
+ const FLOATVAL n = sinh(VTABLE_get_number(INTERP, SELF));
1485
+ PMC * const retval = pmc_new(INTERP, dynpmc_LuaNumber);
1486
+ VTABLE_set_number_native(INTERP, retval, n);
1487
+ RETURN(PMC *retval);
1488
+ }
1489
+
1490
+ /*
1491
+
1492
+ =item C<PMC* tanh()>
1493
+
1494
+ =cut
1495
+
1496
+ */
1497
+ METHOD PMC* tanh() {
1498
+ const FLOATVAL n = tanh(VTABLE_get_number(INTERP, SELF));
1499
+ PMC * const retval = pmc_new(INTERP, dynpmc_LuaNumber);
1500
+ VTABLE_set_number_native(INTERP, retval, n);
1501
+ RETURN(PMC *retval);
1502
+ }
1503
+
1504
+ /*
1505
+
1464
1506
=item C<PMC* tgamma()>
1465
1507
1466
1508
=cut
You can’t perform that action at this time.
0 commit comments