math 5/2 returns 2.
math 5/2
I want 2.5 - how to get decimal values?
You can "force" mathreturn the default values - use the parameter -lfor bc:
math
-l
bc
$ math 5/2 2 $ function bc command bc -l $argv end $ math 5/2 2.50000000000000000000
Add this to one of the config.fish files
set -x BC_ENV_ARGS ~/.bc.cfg
Then create a .bc.cfg file to tell a lot of decimal places to display
echo "scale = 5" >> .bc.cfg
This will:
2,50000
you need to force floating point division instead of integer division
math 5/2.0
Source: https://habr.com/ru/post/1532151/More articles:Grunt-contrib-clean task does not delete files using src network path - gruntjshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1532147/setting-up-redis-to-go-with-heroku-and-rails-400&usg=ALkJrhgwJYGGlACK9KGTz2vZAR2K8Iy9MAHow to get a preview frame every 500 ms - javaQPainter.drawText ugly font rendering - python-3.xParsing CSV in Python - pythonTestNG does not run tests in test suite - javaGeographical graph: error ggmap - rBITS Transferring a file with multiple domains - powershellA few lines of text in an extjs grid panel cell - htmlCurrent best practice for a "retirement" project on github and npmjs.org? - githubAll Articles