Zaokrúhliť nahor vavlues na 10. desatinné bash

Príklady kódu

0
0

zaokrúhliť nahor vavlues na 10. desatinné bash

And this is the result.

ceil(0.0)=	0.0,	floor(0.0)=	0.0,      	round(0.0)=	0,	    int(0.0)=	0
ceil(0.25)=	1.0,	floor(0.25)=0.0, 		round(0.25)=0,		int(0.25)=	0
ceil(0.5)=	1.0,	floor(0.5)=	0.0,	    round(0.5)=	1,     	int(0.5)=	0
ceil(0.75)=	1.0,	floor(0.75)=0.0,		round(0.75)=1,  	int(0.75)=	0
ceil(1.0)=	1.0,	floor(1.0)=	1.0,	    round(1.0)=	1,	 	int(1.0)=	1
ceil(1.25)=	2.0,	floor(1.25)=1.0,		round(1.25)=1,		int(1.25)=	1
ceil(1.5)=	2.0,	floor(1.5)=	1.0,	    round(1.5)=	2,		int(1.5)=	1
ceil(1.75)=	2.0,	floor(1.75)=1.0,		round(1.75)=2,		int(1.75)=	1
ceil(2.0)=	2.0,	floor(2.0)=	2.0,	    round(2.0)=	2,		int(2.0)=	2

https://wiki.tcl-lang.org/page/Rounding+in+Tcl
https://bits.mdminhazulhaque.io/linux/round-number-in-bash-script.html

Podobné stránky

Podobné stránky s príkladmi

V iných jazykoch

Táto stránka je v iných jazykoch

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................