Skip to content
IT Nursery
  • Home
  • Programming
    • Mac / IOS
    • Android
    • Web Applications
    • PHP
    • Java
    • C
    • C++
  • DataBase
    • MySQL
  • CMS
    • WordPress
  • System and Network
    • Serverfault

floating-point

Is it possible to get a decimal output from doing division in Bash? [duplicate]

by IT Nursery

Is it possible to get a decimal output from doing division in Bash? [duplicate]

Tags bash, floating-point

How to round or convert a float value to int with bc? getting: “(standard_in) 1: syntax error”

by IT Nursery

I don’t see an answer to @vin’s problem, which is: But I am getting (standard_in) 1: syntax error The bc command prints (standard_in) … Read more

Tags bc, conversion, floating-point, shell-script, variable

Weird float rounding behavior with printf

by IT Nursery

It is not a bug, it is intentional. It is doing a type of round to nearest (more on that later). With exactly … Read more

Tags bash, floating-point, math, printf, shell-script

Comparison of decimal numbers in bash

by IT Nursery

Inside [[…]] < is for string comparison. So [[ 3.56 < 2.90 ]] or [[ (3.56 < 2.90) ]] or [[ ((3.56 < … Read more

Tags arithmetic, bash, floating-point

Bash limiting precision of floating point variables

by IT Nursery

There is a special variable called scale. You can set this variable to limit the precision. EXAMPLE $ echo “300/7” | bc -l … Read more

Tags bash, bc, floating-point

Can bash do floating-point arithmetic without using an external command? [duplicate]

by IT Nursery

“Can bash also do floating-point arithmetic without using an external command?” Nope. [email protected]:/tmp$ echo $((2.5 * 3)) bash: 2.5 * 3: syntax error: … Read more

Tags arithmetic, bash, floating-point

bash loop with 0.02 increment

by IT Nursery

Reading the bash man page gives the following information: for (( expr1 ; expr2 ; expr3 )) ; do list ; done First, … Read more

Tags bash, floating-point, for

How to convert Decimal to Double in C#?

by IT Nursery

An explicit cast to double like this isn’t necessary: double trans = (double) trackBar1.Value / 5000.0; Identifying the constant as 5000.0 (or as … Read more

Tags c, decimal, double, floating-point, type-conversion

How do I use a decimal step value for range()?

by IT Nursery

How do I use a decimal step value for range()?

Tags floating-point, python, range

How do I check if a string represents a number (float or int)?

by IT Nursery

How do I check if a string represents a number (float or int)?

Tags casting, floating-point, python, type-conversion
Post navigation
Older posts
Page1 Page2 … Page10 Next →

Recent Posts

  • Advice for improving internal dashboard [closed]
  • grep : ‘+’ special character
  • File location for Syslogs in Centos machine
  • How to collect users’ task completion times?
  • “service {FOO} start” vs. “/etc/init.d/{FOO} start”? [closed]
IT Nursery
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Important Link

  • About
  • Privacy Policy
  • Contact

IT Nursery

The Goal of ITNursery Engaging the world to foster innovation through aggregate information. Our Question Answer post, blog information, products and tools help developers and technologists in life and at work.

copyright © 2023 All Right Reserved | IT NurSery