-2

I want to use:

echo 'scale=6; sqrt(1/4670*1e-06)' | bc

But I get:

(standard_in) 1: syntax error
(standard_in) 1: syntax error

1 Answers1

0

Since bc doesn't accept the *1e-06 notation, you've gotta use *10^(-6). I recommend you use

echo 'sqrt(1/(4670*10^(-6)))' | bc -l

The -l option loads bc's math library and sets the scale to 20.

Mike Pierce
  • 292
  • 3
  • 18