converting exponential format number to decimal format number
Hi group, is there a quick way to convert an exponential format number
to decimal format number. For example,
13.534e+10 = 1353400000
I can come up a perl function but it's not perly. Can I get some help
"Fei Liu" <firstname.lastname@example.org> wrote:
perl -e "print 13.534e+10"
perl -e "my $var = 13.534e+10; print length $var"
So at least here (WinXP+ActiveState) Perl does this internally.
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and example...Formatting numbers to currency format
I would like to know if Perl has a function to correctly format a string of
numbers into currency format. I have a small subroutine that takes a number
and adds a tax amount. Below is the base:
$amount = 100;
$tax = 0.05 # 5% tax rate
$finaltotal = $amount * $tax;
$finaltotal = sprintf("%.02f",$finaltotal);
Sometimes when then $amount is a complex number such as 1423 I will get
several decimal places, and sprintf rounds to two decimal places. This is
good. But when the amount like simple as seen above, there are no cedimal
places, therefor sprintf doesnt have anything to round. I a...Standard number format and number of digits
I was wondering if there is a way to set the number of digits that are
displayed and/or used by the calculator (HP49G+) in the standard number
I prefer using the standard format, I found it more readable than the
others, apart that it clutters the display with long numbers. Is it
possible to somehow ask the calculator to display up to a certain number
In article <email@example.com>,
Vasilis Vlachoudis <Vasilis.Vlachoudis@cern.ch> wrote:
> Hello all,
> I was wondering if there is a way to set the num...SQLLDR fixed format and number format
the following situation:
I have a datafile with following format:
Aug 05 97.865 97.865 0.000 97.870S 97.865 97.950 97.665
97.865 13 N/A 0| 202 20,418
Sep 05 97.865 97.860 0.000 97.865 97.860 97.995 94.290
97.860 20,410 N/A 0| 21,314 521,305
Oct 05 97.835 0.000 97.865 97.800
97.835 0 N/A 0| 0 2,998
Nov 05 97.830 97.830 0.000 97.830 97.830 97...Format numbers to time format using SED
I'm trying to format any 3 or 4 digit number at the start of a line to
a time format. I have googled to my hearts content and tried any and
all combinations of sed to try and get something. Since the numbers
can randomly start at any line, I have problems there. Here is a
SPECIAL WEATHER STATEMENT NATIONAL WEATHER SERVICE
GREENVILLE-SPARTANBURG SC 318 AM EDT THU JUL 22 2004 NORTHERN JACKSON
NC- OCONEE MOUNTAINS SC-PICKENS MOUNTAINS SC-POLK NC-RABUN GA-ROWAN
NC- RUTHERFORD NC-SOUTHERN JACKSON NC-SPARTANBURG SC-STEPHENS GA-
SWAIN NC-TRANSYLVANIA NC-UNION SC-UNION NC-YANCEY NC
318 AM...XSLT error with number and format-number functions
I have found an odd error when using an XSL stylesheet transform. We
have a Notes/Domino application with the following line of code in one
of the stylesheets:
After transforming an XML document object with this stylesheet, the
value in the XML node ActEmpMoneyValue is not calculated, but a flat
value such as "19.31". After being processed as above on our local
system/codebase, it becomes "19.31", as expected. However, the exact
same code on certain customer systems ...binary number format ? format character %b or similar.
I'm was wanting to format a positive integer in binary,
and not finding it--to my surprise--I rolled my own version.
Is this already in python, or have I missed it somewhere?
I have Googled around a bit, and found a few threads on
the subject, but they all seem to fizzle out.
(e.g. : INPUT 35, OUTPUT "100011" )
I don't know if you found this example:
> I'm was wanting to format a positive integer in binary,
> and not finding it--to my surprise--I rolled my own version.
> Is this already in python, or have...Converting Real numbers with IEEE format to G_Float format
We are trying to migrate an Oracle application from OpenVMS Alpha to
With Oracle on OpenVMS Integrity the real numbers are stored in IEEE
All the application code is compiled using G_Float, and we do not want
to change this as it will impact on communications with the PLCs.
Is it possible to convert IEEE format numbers to G_Float format
> We are trying to migrate an Oracle application from OpenVMS Alpha to
> OpenVMS Integrity.
> With Oracle on OpenVMS Integrity the real n...Use format file to format large number of variables
I have two datasets that were sent to me
Data1.sas7bdat and data2.sas7bdat
The data has associated formats stored in a file
I want to print out the data in a formatted style to look at. I know how to=
use formats in print etc, but I wonder if you can just tell it to use the =
format library and format each variable as defined.
Real problem is one of typing (laziness). The datasets have 238 and 171 var=
iables and they are formatted with one of 13 formats. I really don't want t=
o type all the variable names in a format statement.
Any suggestion would be appre...