PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: FAQ Size: 1.78 KB
/proc/thread-self/root/usr/share/doc/bc/FAQ

Because of frequent questions ....... here is the BC FAQ


1) Why does BC have its own arbitrary precision number routines 
   (found in lib/number.c) rather than using GMP?

GMP has "integers" (no digits after a decimal), "rational numbers"
(stored as 2 integers) and "floats".  None of these will correctly
represent a POSIX BC number.  Floats are the closest, but will not
behave correctly for many computations.  For example, BC numbers have
a "scale" that represent the number of digits to represent after the
decimal point.  The multiplying two of these numbers requires one to
calculate an exact number of digits after the decimal point regardless
of the number of digits in the integer part.  GMP floats have a
"fixed, but arbitrary" mantissa and so multiplying two floats will end
up dropping digits BC must calculate.

2) The code "ibase=16; obase=10; FF" outputs FF, not 255.  Isn't this
   a bug?

No.  ibase changed the input base at that point.  The 10 is then in
base 16 and thus is the value 16.  Therefore, both ibase and obase
are 16 (decimal).  And FF (base 16) on input is printed as FF (base 16)
on output.  So how can one get 255?  First, single digit numbers are
not converted using ibase.  So A is always 10 (decimal).  The following
code will always work.  "ibase=F+1; obase=A; FF" and that always prints
255.

3) Why is the scale variable ignored on multiply?

That is the way POSIX specifics multiply.  Reread the documentation for
the multiply operation and see that multiply uses the scales of the
numbers multiplied to determine the scale of the result.

4) bc's mod command is not working when I run with "bc -l".

bc's mod (%) command works like integer remainder when scale is 0.
The -l flag sets scale to 20 and that chanes how a % b is computed.
Read the man page for exact details.

Directory Contents

Dirs: 1 × Files: 4

Name Size Perms Modified Actions
Examples DIR
- drwxr-xr-x 2025-04-06 18:07:21
Edit Download
241 B lrw-r--r-- 2006-09-05 00:42:41
Edit Download
1.78 KB lrw-r--r-- 2017-04-07 21:58:57
Edit Download
2.97 KB lrw-r--r-- 2017-04-07 21:36:05
Edit Download
3.44 KB lrw-r--r-- 2016-02-01 00:03:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI