@@ -152,11 +152,12 @@ between zero and the number.
152
152
153
153
say 1e5.rand; # 33128.495184283
154
154
155
- = head2 method sin
155
+ = head2 routine sin
156
156
157
157
method sin()
158
+ sub sin(Numeric(Cool))
158
159
159
- Coerces the invocant to L < Numeric|/type/Numeric > , interprets it as radians,
160
+ Coerces the invocant (or in the sub firm, the argument) to L < Numeric|/type/Numeric > , interprets it as radians,
160
161
returns its L < sine|https://en.wikipedia.org/wiki/Sine > .
161
162
162
163
say sin(0); # 0
@@ -167,139 +168,165 @@ Note that Perl 6 is no computer algebra system, so C<sin(pi)> typically does
167
168
not produce an exact 0, but rather a very small L < floating-point
168
169
number|/type/Num > .
169
170
170
- = head2 method asin
171
+ = head2 routine asin
171
172
173
+ sub asin(Numeric(Cool))
172
174
method asin()
173
175
174
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
176
+ Coerces the invocant (or in the sub firm, the argument) to L < Numeric|/type/Numeric > , and returns its
175
177
L < arc-sine|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
176
178
radians.
177
179
178
- = head2 method cos
180
+ say 0.1.asin; # 0.10016742116156
181
+
182
+ = head2 routine cos
179
183
180
184
method cos()
185
+ sub cos(Numeric(Cool))
181
186
182
- Coerces the invocant to L < Numeric|/type/Numeric > , interprets it as radians,
187
+ Coerces the invocant (or in sub form, the argument) to L < Numeric|/type/Numeric > , interprets it as radians,
183
188
returns its L < sine|https://en.wikipedia.org/wiki/Cosine > .
184
189
185
- = head2 method acos
190
+ say 0.cos; # 1
191
+ say pi.cos; # -1
192
+ say cos(pi/2); # 6.12323399573677e-17
193
+
194
+ = head2 routine acos
186
195
187
196
method acos()
197
+ sub acos(Numeric(Cool))
188
198
189
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
199
+ Coerces the invocant (or in sub form, the argument) to L < Numeric|/type/Numeric > , and returns its
190
200
L < arc-cosine|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
191
201
radians.
192
202
193
- = head2 method tan
203
+ = head2 routine tan
194
204
195
- Coerces the invocant to L < Numeric|/type/Numeric > , interprets it as radians,
205
+ method tan()
206
+ sub acos(Numeric(Cool))
207
+
208
+ Coerces the invocant (or in sub form, the argument) to L < Numeric|/type/Numeric > , interprets it as radians,
196
209
returns its L < tangens|https://en.wikipedia.org/wiki/Tangent > .
197
210
198
- = head2 method atan
211
+ = head2 routine atan
199
212
200
213
method atan()
214
+ sub atan(Numeric(Cool))
201
215
202
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
216
+ Coerces the invocant (or in sub form, the argument) to L < Numeric|/type/Numeric > , and returns its
203
217
L < arc-tangens|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
204
218
radians.
205
219
206
- = head2 method atan2
220
+ = head2 routine atan2
207
221
208
222
method atan2($y = 1e0)
223
+ sub atan2(Numeric() $x, Numeric() $y = 1e0)
209
224
210
- Coerces the invocant to L < Numeric|/type/Numeric > , and together with its
211
- argument, returns its two-argument
225
+ Coerces the arguments (including the invocant in the method form) to L < Numeric|/type/Numeric > ,
226
+ and returns their two-argument
212
227
L < arc-tangens|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
213
228
radians.
214
229
215
230
= head2 method sec
216
231
217
232
method sec()
233
+ sub sec(Numeric(Cool))
218
234
219
- Coerces the invocant to L < Numeric|/type/Numeric > , interprets it as radians,
235
+ Coerces the invocant (or in sub form, its argument) to L < Numeric|/type/Numeric > , interprets it as radians,
220
236
returns its L < secans|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions > ,
221
237
that is, the reciprocal of its cosine.
222
238
223
- = head2 method asec
239
+ = head2 routine asec
224
240
225
241
method asec()
242
+ sub asec(Numeric(Cool))
226
243
227
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
244
+ Coerces the invocant (or in sub form, its argument) to L < Numeric|/type/Numeric > , and returns its
228
245
L < arc-secans|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
229
246
radians.
230
247
231
- = head2 method cosec
248
+ = head2 routine cosec
232
249
233
250
method cosec()
251
+ sub cosec(Numeric(Cool))
234
252
235
- Coerces the invocant to L < Numeric|/type/Numeric > , interprets it as radians,
253
+ Coerces the invocant (or in sub form, its argument) to L < Numeric|/type/Numeric > , interprets it as radians,
236
254
returns its L < cosecans|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions > ,
237
255
that is, the reciprocal of its sine.
238
256
239
- = head2 method acosec
257
+ = head2 routine acosec
240
258
241
259
method acosec()
260
+ sub acosec(Numeric(Cool))
242
261
243
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
262
+ Coerces the invocant (or in sub form, its argument) to L < Numeric|/type/Numeric > , and returns its
244
263
L < arc-cosecans|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
245
264
radians.
246
265
247
- = head2 method cotan
266
+ = head2 routine cotan
248
267
249
268
method cotan()
269
+ sub cotangens(Numeric(Cool))
250
270
251
- Coerces the invocant to L < Numeric|/type/Numeric > , interprets it as radians,
271
+ Coerces the invocant (or in sub form, its argument) to L < Numeric|/type/Numeric > , interprets it as radians,
252
272
returns its L < cotangens|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions > ,
253
273
that is, the reciprocal of its tangens.
254
274
255
- = head2 method acotan
275
+ = head2 routine acotan
256
276
257
277
method acotan()
278
+ sub acotan(Numeric(Cool))
258
279
259
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
280
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
260
281
L < arc-cotangens|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions > in
261
282
radians.
262
283
263
- = head2 method sinh
284
+ = head2 routine sinh
264
285
265
286
method sinh()
287
+ sub sinh(Numeric(Cool))
266
288
267
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
289
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
268
290
L < Sine hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function > .
269
291
270
- = head2 method asinh
292
+ = head2 routine asinh
271
293
272
294
method asinh()
295
+ sub asinh(Numeric(Cool))
273
296
274
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
297
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
275
298
L < Inverse Sine hyperbolicus|https://en.wikipedia.org/wiki/Inverse_hyperbolic_function > .
276
299
277
- = head2 method cosh
300
+ = head2 routine cosh
278
301
279
302
method cosh()
303
+ sub cosh(Numeric(Cool))
280
304
281
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
305
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
282
306
L < Cosine hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function > .
283
307
284
- = head2 method acosh
308
+ = head2 routine acosh
285
309
286
310
method acosh()
311
+ sub acosh(Numeric(Cool))
287
312
288
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
313
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
289
314
L < Inverse Cosine hyperbolicus|https://en.wikipedia.org/wiki/Inverse_hyperbolic_function > .
290
315
291
- = head2 method tanh
316
+ = head2 routine tanh
292
317
293
318
method tanh()
319
+ sub tanh(Numeric(Cool))
294
320
295
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
321
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
296
322
L < Tangens hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function > .
297
323
298
- = head2 method atanh
324
+ = head2 routine atanh
299
325
300
326
method atanh()
327
+ sub atanh(Numeric(Cool))
301
328
302
- Coerces the invocant to L < Numeric|/type/Numeric > , and returns its
329
+ Coerces the invocant (or in method form, its argument) to L < Numeric|/type/Numeric > , and returns its
303
330
L < Inverse tangens hyperbolicus|https://en.wikipedia.org/wiki/Inverse_hyperbolic_function > .
304
331
305
332
= head2 method log
0 commit comments