Skip to content

Commit 33d0d5f

Browse files
authored
bc: pod update (#868)
* bc: pod update * De-duplicate: Mathlib functions are already documented under REFERENCES so the pod comment can be removed * De-duplicate: Command options are already documented under DESCRIPTION * Typos: "assignent", "assigment", "generats" * * j() takes two arguments
1 parent 7603aa2 commit 33d0d5f

File tree

1 file changed

+4
-79
lines changed

1 file changed

+4
-79
lines changed

bin/bc

+4-79
Original file line numberDiff line numberDiff line change
@@ -90,42 +90,6 @@ C<bc> will never read from the standard input.)
9090
C<bc> will terminate interactive input via stdin if you enter C<quit>
9191
or press C<CTRL-C>.
9292

93-
=head1 OPTIONS
94-
95-
C<bc> takes the following options from the command line:
96-
97-
=over 4
98-
99-
=item -b
100-
101-
Use Math::BigFloat for arbitrarily large number support.
102-
103-
=item -d
104-
105-
Print debugging data (using Data::Dumper).
106-
107-
=item -y
108-
109-
Turn on parser debugging.
110-
111-
=begin comment ### -l hidden because it generate syntax errors
112-
113-
=item -l
114-
115-
Define the standard math library.
116-
117-
=end comment
118-
119-
=begin comment ### -h and hidden because it's not supported
120-
121-
=item -h
122-
123-
Print the documentation.
124-
125-
=end comment
126-
127-
=back
128-
12993
=head1 BASIC ELEMENTS
13094

13195
=head2 Numbers
@@ -395,7 +359,7 @@ The result is 1 if either expression is non-zero.
395359

396360
The expression precedence is as follows: (lowest to highest)
397361

398-
= += etc operators (assigment) right associative
362+
= += etc operators (assignment) right associative
399363
|| OR operator left associative
400364
&& AND operator left associative
401365
! NOT operator nonassociative
@@ -606,45 +570,6 @@ example, C<if (0 == 1) quit> will cause C<bc> to terminate.
606570

607571
=back
608572

609-
=begin comment ### hidden because functions aren't working
610-
611-
=head1 MATH LIBRARY FUNCTIONS
612-
613-
If C<bc> is invoked with the C<-l> option, a math library is preloaded
614-
and the default SCALE is set to 20. The math functions will calculate
615-
their results to the scale set at the time of their call. The math
616-
library defines the following functions:
617-
618-
=over 4
619-
620-
=item C<s (X)>
621-
622-
The sine of X, X is in radians.
623-
624-
=item C<c (X)>
625-
626-
The cosine of X, X is in radians.
627-
628-
=item C<a (X)>
629-
630-
The arctangent of X, arctangent returns radians.
631-
632-
=item C<l (X)>
633-
634-
The natural logarithm of X.
635-
636-
=item C<E (X)>
637-
638-
The exponential function of raising E to the value X.
639-
640-
=item C<J (N,X)>
641-
642-
The bessel function of integer order N of X.
643-
644-
=back
645-
646-
=end comment
647-
648573
=head1 EXAMPLE
649574

650575
The following illustrates how C<bc> expressions can be written in
@@ -688,7 +613,7 @@ extensions to GNU C<bc>. However, some features and extensions are
688613
either not supported or are not working.
689614

690615
Perhaps the biggest non-working feature would be Function definitions
691-
via the C<define> syntax, which if used generats syntax errors. As a
616+
via the C<define> syntax, which if used generates syntax errors. As a
692617
consequence, the -l option (to load math library definitions) doesn't
693618
work either.
694619

@@ -729,7 +654,7 @@ The following C<bc> features are not supported in this implementation.
729654
* "warranty" pseudo statement
730655
* function definitions
731656

732-
In addition, the GNU implementation set the precedence of assignent
657+
In addition, the GNU implementation set the precedence of assignment
733658
below + and - and above relational operators (< > etc). This
734659
implementation seems to make it the lowest precedence (i.e. below ||),
735660
as most perl (and C) users would expect.
@@ -756,7 +681,7 @@ The library provides these functions:
756681

757682
=item * e(X) - the natural base, e, raised to the X power
758683

759-
=item * j(X) - the Bessel function of order X, where X is an integer
684+
=item * j(n,x) - the Bessel function of order n, where n is an integer
760685

761686
=item * l(X) - the natural logarithm of X
762687

0 commit comments

Comments
 (0)