RosettaCodeData/Task/Real-constants-and-functions/Bc/real-constants-and-functions-2.bc
2017-09-25 22:28:19 +02:00

11 lines
300 B
Text

scale = 6
l(2) /* .693147 natural logarithm */
e(2) /* 7.389056 exponential */
p = 4 * a(1)
e = e(1)
p /* 3.141592 pi to 6 fractional digits */
e /* 2.178281 e to 6 fractional digits */
e(l(2) * -3.4) /* .094734 2 to the power of -3.4 */
l(1024) / l(2) /* 10.000001 logarithm base 2 of 1024 */