3 ms·
a(1) here is the arctangent of 1. I hadn't thought about when bc does its truncation with the scale variable, but your explanation appears to be exactly right.
by schoen 5y ago
a(1) here is the arctangent of 1.
I hadn't thought about when bc does its truncation with the scale variable, but your explanation appears to be exactly right. With scale=8, a(1) returns .78539816, which is already truncated to 8 digits.
There is some discussion on intermediate result truncation (not exactly in those terms) in the "EXPRESSIONS" section of the bc(1) man page. It notes that "Every expression has a scale", and elsewhere the man page notes that "All numbers are represented internally in decimal and all computation is done in decimal".