10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My current find command does not support printf.
I need find package that supports printf on AiX 6.1 system.
Can anyone help me with the download link or where / how / if I can find it ?
Can it be installed at a different non default location so that it can be reference without... (5 Replies)
Discussion started by: mohtashims
5 Replies
2. UNIX for Advanced & Expert Users
Hello is there any trusted OpenJDK 1.8 RPM that can be used on AIX 7.1?
We are having problem with the application development using the JDK that comes from IBM. I dont see much information in internet about this, except PowerPC/AIX Port - Port: PowerPC/AIX - OpenJDK Wiki
Any ideas? (2 Replies)
Discussion started by: karumudi7
2 Replies
3. AIX
Hello,
We have an Power8 System (S822) and a IBM StorWize v3700 SAN.
The OS is AIX 7.1.
With this hardware from what I read I need to download/install special SDDPCM drivers, so I did (SDDPCM VERSION 2.6.6.0 (devices.sddpcm.71.rte).
I carved my volumes in the StorWize and presented to... (3 Replies)
Discussion started by: c3rb3rus
3 Replies
4. AIX
Please send me link for XVFB Source package for AIX (3 Replies)
Discussion started by: prathap.g
3 Replies
5. AIX
Hi Experts,
How to Check the what runtime package is applied on AIX OS?
I would like to verify if “xlcpp.rte.10.1.0.aix.base” package is applied or not ?
thanks in advance.
-Mallela (1 Reply)
Discussion started by: meetmallela
1 Replies
6. AIX
How to compile a package surce in AIX when we download its source? (2 Replies)
Discussion started by: johnveslin
2 Replies
7. AIX
I have created a .bff package for an app to tbe installed on AIX servers across regions. I am pretty new to the AIX mode of packaging using mkinstallp but I have been able to get the same done. I installed the same on the server in which i created the package and the application was deployed... (9 Replies)
Discussion started by: jobbyjoseph
9 Replies
8. AIX
Hi,
I have created a relocatable AIX package named Test.
The USIL is /abc
bash-2.05b# lsusil
INSTALL PATH = /abc
COMMENTS = None
Generally if a package gets installed in "/opt/Test" and i want to relocate it to "/abc" it gets installed under "/abc/Test". This happens the way in Solaris,... (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies
9. AIX
Hello,
we have an 7015-R40, we want to update AIX.
oslevel shows 4.3.2.0
At ibm.com we found following
AIX 4300-11 maintenance package
Recommended maintenance for AIX 4.3.3
It's possible to update the system with this file or does we need another source?
Thank you!
S. (8 Replies)
Discussion started by: Sagitario
8 Replies
10. UNIX for Advanced & Expert Users
When i install SSH on AIX 5.1 I get the following message
{
A prerequisite package has not been installed. Open SSH
requires Open SSL (Secure Sockets Layer). Please install
Open SSL from the AIX Toolbox for Linux CD or Toolbox website:
}
I cannot find the AIX toolbox for linux CD, also on... (1 Reply)
Discussion started by: janr
1 Replies
ROUND(3) 1 ROUND(3)
round - Rounds a float
SYNOPSIS
float round (float $val, [int $precision], [int $mode = PHP_ROUND_HALF_UP])
DESCRIPTION
Returns the rounded value of $val to specified $precision (number of digits after the decimal point). $precision can also be negative or
zero (default).
Note
PHP doesn't handle strings like "12,300.2" correctly by default. See converting from strings.
PARAMETERS
o $val
- The value to round
o $precision
- The optional number of decimal digits to round to.
o $mode
- Use one of the following constants to specify the mode in which rounding occurs.
+--------------------+---------------------------------------------------+
| Constant | |
| | |
| | Description |
| | |
+--------------------+---------------------------------------------------+
| | |
| PHP_ROUND_HALF_UP | |
| | |
| | Round $val up to $precision decimal places away |
| | from zero, when it is half way there. Making 1.5 |
| | into 2 and -1.5 into -2. |
| | |
| | |
|PHP_ROUND_HALF_DOWN | |
| | |
| | Round $val down to $precision decimal places |
| | towards zero, when it is half way there. Making |
| | 1.5 into 1 and -1.5 into -1. |
| | |
| | |
|PHP_ROUND_HALF_EVEN | |
| | |
| | Round $val to $precision decimal places towards |
| | the next even value. |
| | |
| | |
|PHP_ROUND_HALF_ODD | |
| | |
| | Round $val to $precision decimal places towards |
| | the next odd value. |
| | |
+--------------------+---------------------------------------------------+
RETURN VALUES
The rounded value
EXAMPLES
Example #1
round(3) examples
<?php
echo round(3.4); // 3
echo round(3.5); // 4
echo round(3.6); // 4
echo round(3.6, 0); // 4
echo round(1.95583, 2); // 1.96
echo round(1241757, -3); // 1242000
echo round(5.045, 2); // 5.05
echo round(5.055, 2); // 5.06
?>
Example #2
$mode examples
<?php
echo round(9.5, 0, PHP_ROUND_HALF_UP); // 10
echo round(9.5, 0, PHP_ROUND_HALF_DOWN); // 9
echo round(9.5, 0, PHP_ROUND_HALF_EVEN); // 10
echo round(9.5, 0, PHP_ROUND_HALF_ODD); // 9
echo round(8.5, 0, PHP_ROUND_HALF_UP); // 9
echo round(8.5, 0, PHP_ROUND_HALF_DOWN); // 8
echo round(8.5, 0, PHP_ROUND_HALF_EVEN); // 8
echo round(8.5, 0, PHP_ROUND_HALF_ODD); // 9
?>
Example #3
$mode with precision examples
<?php
/* Using PHP_ROUND_HALF_UP with 1 decimal digit precision */
echo round( 1.55, 1, PHP_ROUND_HALF_UP); // 1.6
echo round( 1.54, 1, PHP_ROUND_HALF_UP); // 1.5
echo round(-1.55, 1, PHP_ROUND_HALF_UP); // -1.6
echo round(-1.54, 1, PHP_ROUND_HALF_UP); // -1.5
/* Using PHP_ROUND_HALF_DOWN with 1 decimal digit precision */
echo round( 1.55, 1, PHP_ROUND_HALF_DOWN); // 1.5
echo round( 1.54, 1, PHP_ROUND_HALF_DOWN); // 1.5
echo round(-1.55, 1, PHP_ROUND_HALF_DOWN); // -1.5
echo round(-1.54, 1, PHP_ROUND_HALF_DOWN); // -1.5
/* Using PHP_ROUND_HALF_EVEN with 1 decimal digit precision */
echo round( 1.55, 1, PHP_ROUND_HALF_EVEN); // 1.6
echo round( 1.54, 1, PHP_ROUND_HALF_EVEN); // 1.5
echo round(-1.55, 1, PHP_ROUND_HALF_EVEN); // -1.6
echo round(-1.54, 1, PHP_ROUND_HALF_EVEN); // -1.5
/* Using PHP_ROUND_HALF_ODD with 1 decimal digit precision */
echo round( 1.55, 1, PHP_ROUND_HALF_ODD); // 1.5
echo round( 1.54, 1, PHP_ROUND_HALF_ODD); // 1.5
echo round(-1.55, 1, PHP_ROUND_HALF_ODD); // -1.5
echo round(-1.54, 1, PHP_ROUND_HALF_ODD); // -1.5
?>
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | The $mode parameter was introduced. |
| | |
| 5.2.7 | |
| | |
| | The inner workings of round(3) was changed to |
| | conform to the C99 standard. |
| | |
+--------+---------------------------------------------------+
SEE ALSO
ceil(3), floor(3), number_format(3).
PHP Documentation Group ROUND(3)