We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated from rt.perl.org#1970 (status was 'resolved')
Searchable as RT1970$
The text was updated successfully, but these errors were encountered:
#!/usr/local/bin/perl5 -w
$x = 22818.875 - 22765.65; print("$x\n");
outputs:
53.2249999999985
The equiv C code
#include <stdio.h>
void main(void) { double x; x = 22818.875 - 22765.65; printf("%lf\n", x); }
correctly outputs:
53.225
Sorry, something went wrong.
On Mon, Jan 10, 2000 at 01:03:01PM -0700, Tim Jackson wrote:
On HP PA-RISC systems (perl version 5.005_02 built for PA-RISC1.1), the following code #!/usr/local/bin/perl5 -w $x = 22818.875 - 22765.65; print("$x\n"); outputs: 53.2249999999985 The equiv C code #include <stdio.h> void main(void) { double x; x = 22818.875 - 22765.65; printf("%lf\n", x); } correctly outputs: 53.225
On HP PA-RISC systems (perl version 5.005_02 built for PA-RISC1.1), the following code
Those two code samples are not equivalent. Try this instead:
$x = 22818.875 - 22765.65; printf "%lf\n", $x;
Also, refer to the first entry in perlfaq4.
Ronald
No branches or pull requests
Migrated from rt.perl.org#1970 (status was 'resolved')
Searchable as RT1970$
The text was updated successfully, but these errors were encountered: