Skip to content

Commit c68a8fd

Browse files
committed
Any: many of those methods also exists in sub form
1 parent 9a9effb commit c68a8fd

File tree

1 file changed

+65
-38
lines changed

1 file changed

+65
-38
lines changed

lib/Type/Cool.pod

Lines changed: 65 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,12 @@ between zero and the number.
152152
153153
say 1e5.rand; # 33128.495184283
154154
155-
=head2 method sin
155+
=head2 routine sin
156156
157157
method sin()
158+
sub sin(Numeric(Cool))
158159
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,
160161
returns its L<sine|https://en.wikipedia.org/wiki/Sine>.
161162
162163
say sin(0); # 0
@@ -167,139 +168,165 @@ Note that Perl 6 is no computer algebra system, so C<sin(pi)> typically does
167168
not produce an exact 0, but rather a very small L<floating-point
168169
number|/type/Num>.
169170
170-
=head2 method asin
171+
=head2 routine asin
171172
173+
sub asin(Numeric(Cool))
172174
method asin()
173175
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
175177
L<arc-sine|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
176178
radians.
177179
178-
=head2 method cos
180+
say 0.1.asin; # 0.10016742116156
181+
182+
=head2 routine cos
179183
180184
method cos()
185+
sub cos(Numeric(Cool))
181186
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,
183188
returns its L<sine|https://en.wikipedia.org/wiki/Cosine>.
184189
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
186195
187196
method acos()
197+
sub acos(Numeric(Cool))
188198
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
190200
L<arc-cosine|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
191201
radians.
192202
193-
=head2 method tan
203+
=head2 routine tan
194204
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,
196209
returns its L<tangens|https://en.wikipedia.org/wiki/Tangent>.
197210
198-
=head2 method atan
211+
=head2 routine atan
199212
200213
method atan()
214+
sub atan(Numeric(Cool))
201215
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
203217
L<arc-tangens|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
204218
radians.
205219
206-
=head2 method atan2
220+
=head2 routine atan2
207221
208222
method atan2($y = 1e0)
223+
sub atan2(Numeric() $x, Numeric() $y = 1e0)
209224
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
212227
L<arc-tangens|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
213228
radians.
214229
215230
=head2 method sec
216231
217232
method sec()
233+
sub sec(Numeric(Cool))
218234
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,
220236
returns its L<secans|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
221237
that is, the reciprocal of its cosine.
222238
223-
=head2 method asec
239+
=head2 routine asec
224240
225241
method asec()
242+
sub asec(Numeric(Cool))
226243
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
228245
L<arc-secans|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
229246
radians.
230247
231-
=head2 method cosec
248+
=head2 routine cosec
232249
233250
method cosec()
251+
sub cosec(Numeric(Cool))
234252
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,
236254
returns its L<cosecans|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
237255
that is, the reciprocal of its sine.
238256
239-
=head2 method acosec
257+
=head2 routine acosec
240258
241259
method acosec()
260+
sub acosec(Numeric(Cool))
242261
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
244263
L<arc-cosecans|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
245264
radians.
246265
247-
=head2 method cotan
266+
=head2 routine cotan
248267
249268
method cotan()
269+
sub cotangens(Numeric(Cool))
250270
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,
252272
returns its L<cotangens|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
253273
that is, the reciprocal of its tangens.
254274
255-
=head2 method acotan
275+
=head2 routine acotan
256276
257277
method acotan()
278+
sub acotan(Numeric(Cool))
258279
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
260281
L<arc-cotangens|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
261282
radians.
262283
263-
=head2 method sinh
284+
=head2 routine sinh
264285
265286
method sinh()
287+
sub sinh(Numeric(Cool))
266288
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
268290
L<Sine hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function>.
269291
270-
=head2 method asinh
292+
=head2 routine asinh
271293
272294
method asinh()
295+
sub asinh(Numeric(Cool))
273296
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
275298
L<Inverse Sine hyperbolicus|https://en.wikipedia.org/wiki/Inverse_hyperbolic_function>.
276299
277-
=head2 method cosh
300+
=head2 routine cosh
278301
279302
method cosh()
303+
sub cosh(Numeric(Cool))
280304
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
282306
L<Cosine hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function>.
283307
284-
=head2 method acosh
308+
=head2 routine acosh
285309
286310
method acosh()
311+
sub acosh(Numeric(Cool))
287312
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
289314
L<Inverse Cosine hyperbolicus|https://en.wikipedia.org/wiki/Inverse_hyperbolic_function>.
290315
291-
=head2 method tanh
316+
=head2 routine tanh
292317
293318
method tanh()
319+
sub tanh(Numeric(Cool))
294320
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
296322
L<Tangens hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function>.
297323
298-
=head2 method atanh
324+
=head2 routine atanh
299325
300326
method atanh()
327+
sub atanh(Numeric(Cool))
301328
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
303330
L<Inverse tangens hyperbolicus|https://en.wikipedia.org/wiki/Inverse_hyperbolic_function>.
304331
305332
=head2 method log

0 commit comments

Comments
 (0)