quantized64(3M)quantized64(3M)NAME
quantized64(), quantized128(), quantized32() - decimal quantize functions
SYNOPSIS DESCRIPTION
The function sets the exponent of x to the exponent of y, while attempting to keep the value the same. If the exponent is being increased,
the value is correctly rounded according to the current (decimal) rounding mode.
is useful for rounding to a specified number of decimal places. For example, will round x to four places to the right of the decimal point
(provided the has enough digits to do so).
is a version of it takes arguments and returns a result.
is a version of it takes arguments and returns a result.
These math functions are supported for HP-UX 11i Version 3 September 2008 Update and forward.
USAGE
To use any of these functions, compile with the option.
Make sure your program defines and then includes
Link in the math library by specifying or on the linking command line.
For more information, see the at the following site:
RETURN VALUE
If the exponent of x is being increased and rounding produces a result whose numerical value is different from x, then raises the inexact
exception.
If the exponent of x is being decreased and the of the result has more digits than the type would allow, returns NaN and raises the invalid
exception.
If one or both arguments are NaN, then returns NaN.
Otherwise, if only one argument returns NaN and raises the invalid exception.
If both arguments returns x.
ERRORS
No errors are defined.
SEE ALSO quantexpd64(3M), samequantumd64(3M), math(5).
STANDARDS CONFORMANCE
These functions conform to ISO/IEC TR 24732, "Extension for the programming language C to support decimal floating-point arithmetic".
HP Integrity Server Only quantized64(3M)
Check Out this Related Man Page
quantized64(3M)quantized64(3M)NAME
quantized64(), quantized128(), quantized32() - decimal quantize functions
SYNOPSIS DESCRIPTION
The function sets the exponent of x to the exponent of y, while attempting to keep the value the same. If the exponent is being increased,
the value is correctly rounded according to the current (decimal) rounding mode.
is useful for rounding to a specified number of decimal places. For example, will round x to four places to the right of the decimal point
(provided the has enough digits to do so).
is a version of it takes arguments and returns a result.
is a version of it takes arguments and returns a result.
These math functions are supported for HP-UX 11i Version 3 September 2008 Update and forward.
USAGE
To use any of these functions, compile with the option.
Make sure your program defines and then includes
Link in the math library by specifying or on the linking command line.
For more information, see the at the following site:
RETURN VALUE
If the exponent of x is being increased and rounding produces a result whose numerical value is different from x, then raises the inexact
exception.
If the exponent of x is being decreased and the of the result has more digits than the type would allow, returns NaN and raises the invalid
exception.
If one or both arguments are NaN, then returns NaN.
Otherwise, if only one argument returns NaN and raises the invalid exception.
If both arguments returns x.
ERRORS
No errors are defined.
SEE ALSO quantexpd64(3M), samequantumd64(3M), math(5).
STANDARDS CONFORMANCE
These functions conform to ISO/IEC TR 24732, "Extension for the programming language C to support decimal floating-point arithmetic".
HP Integrity Server Only quantized64(3M)
Hi,
Can any one help me in finding a solution for rounding off to 2 decimal places.
I am using the following code:
VAR1=.01292105263157894736
VAR2=`echo "scale=2; $VAR1 * 100" | bc -l`
The result I 'm getting is
1.29210526315789473600
But I need the output as 1.29
Thanks
Shash (2 Replies)
Hi,
I need to manipualte the data in the file below so that the value fields on each line are truncated to just two decimal places. Meaning i want to delet everything after two decimal places on each record in the file.
I have highlighted the first value field.
02331814579359.6500000004... (3 Replies)
Hi,
I am currently using tcsh
I am trying to round a decimal number to the ten-thousandths place
For instance:
1.23456 is rounded up towards 1.2346
I am not looking for truncation, but for rounding. Anyone know how to do this with awk or expr?
Thanks (2 Replies)
Hi All,
Sorry to say I have 0 experience writing C++ but have been asked to write a piece of code that will take a double input and an integer for number of decimal places as well as integer for padding and output a string that represents the double formatted (with comma thousand separators -... (2 Replies)
I am trying to write a script that raises a integer (m) by a exponent (n) using a while loop
ex. 5 raised to the power of 2 ..
I am a beginner and i dont know what is the opperand or command i have to use to make this happen..this is what i have so far...
echo "Enter a integer for the... (3 Replies)
Hi Guys,
I got stuck to a a point where I need to find the value for (4 to the power of -2 upto 8 places after decimal ....
4^(-2) ; the result I need is upto 8 places after decimal.
How is that possible?
Thanks a lot!! (2 Replies)
Please help me in rounding up value upto 2 decimal palces using sed command
#!/usr/bin/bash
a=15.42
b=13.33
c=`echo $a*$b |bc -l`
echo $c
above code is is giving output "205.5486" but i want the output as "205.55"
Thank you... (15 Replies)
I have input file like below,
201424|9999|OSS|622010|RGT|00378228764
201424|8888|OM|587079|RGT|00284329675
201424|7777|OM|587076|RGT|00128671024
201424|6666|OM|581528|RGT|00113552084
Output should be like below, should add decimal (.) from last 4 digits.
... (2 Replies)