On 21/10/16 19:04, Glenn Jackman wrote:
> As the math function uses `bc`, I alias `bc` to `bc -l`
>
>     $ math 3/4
>     0
>     $ function bc; command bc -l $argv; end
>     $ math 3/4
>     .75000000000000000000
>
>
>
Have not tried that. I  see that you have set up a function. It does 
give a lot of decimal places which I am trying to avoid. I use the 
following, as an example, to get 22/7.

echo (echo "scale=6; 22/7" | bc)
3.142857

If I change the scale to 8, for example,  I get 3.14285714

The query I was referring to was setting the number of decimal places in 
the answer. That is my way. There are probably better ways.

Neil










------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to