Sponsored Content
Full Discussion: C long long HP-UX
Top Forums Programming C long long HP-UX Post 20046 by Shobhit on Friday 19th of April 2002 11:49:04 AM
Old 04-19-2002
Question C long long HP-UX

I have a program written in C on HP-UX 11i. The program is as
below ...
long long a;
a = 12345678987654321;
printf ("%lld",a);

I compile the code using cc compiler on HP-UX using
-Ae +DD32 option as i want it to create a 32-bit binary.
But the output of this program is not correct. But as per the
man page of cc compiler it says that with the option
-Ae +DD32 it supports 64 bit value for long long.


Now if i change the code as below
long long a;
scanf("%lld",&a);
printf ("%lld",a);

and i compile it wiith the same options and manually give this
value 12345678987654321 it works.

( Both the above code work fine with aCC -Ae +DD32 option
but i dont want to use aCC compiler)

Pls help me out in this to explain the absurd behaviour...

Thanx in advance ...............
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Arguments too long????

I'm trying to tranfer files via ftp form UNIX to Linux and vice versa. When I tried mget command I received this message: "arguments too long". What should I do to transfer multiple files?????? (2 Replies)
Discussion started by: rrivas
2 Replies

2. Programming

long doubles

hey there, i've been trrying to calculate the first 10000 fibonacci numbers using a long double. weird thing is that from a certain value it returns Inf. i'm declaring the vars as long double var; and printing them to a file using: fprintf(filepointer, "%.0Ld\n", var); am i doing... (1 Reply)
Discussion started by: crashnburn
1 Replies

3. Post Here to Contact Site Administrators and Moderators

Long threads?

Greetings, I'm relatively new-comer to these forums and have a Q to the mods. Just wondering what's the policy regarding the long running threads where they tend to go say over 30 posts and they become "troubleshooting" threads rather than being "educational" and/or "hinting" threads? ... (4 Replies)
Discussion started by: vgersh99
4 Replies

4. Shell Programming and Scripting

A very long script.

Hello, I wrote a script, which would ideally take about 480 hours to runs (It has to do a same thing 60 times.) But the problem is I have to use a VPN Client to get to the network before connecting to the machine. The Client automatically closes after 10 hours, closing my console and thus my... (3 Replies)
Discussion started by: sakya_trips
3 Replies

5. UNIX for Advanced & Expert Users

Long string

I have a long string in ASCII file of approx 60k bytes file size. I need to know 1.How many charcters are adjectly in string. export MAX_COL_SIZE=`awk "length>max{max=length}END{print max}" test.txt` this return file cann't open...can anyone advice why?? 2. How many 'TRX consist in my... (1 Reply)
Discussion started by: u263066
1 Replies

6. UNIX for Dummies Questions & Answers

vi.....line too long

I'm getting a "line too long" error when I try to vi a particular file. I really just need to view the contents as I don't have to change anything. Any suggestions?? I already tried to cat but it didnt work........:( (7 Replies)
Discussion started by: shorty
7 Replies

7. Solaris

word too long

Hello, When I try to run a shell script, It throws an error: $ ./SQLExecute.csh Word too long $ echo $CLASSPATH /u02/installs/calypso/calypsorel90000/jars/ $ echo $PATH... (7 Replies)
Discussion started by: panchpan
7 Replies

8. Solaris

Filename too long

Hi, I'm trying to tar on Solaris 9 a directory containing very long filename, so tar exit with the error (filename is greater than 100). Is there a way to bypass this limit (I can't realy control filename long)? Regards (3 Replies)
Discussion started by: ncjbdwqer
3 Replies

9. UNIX for Dummies Questions & Answers

Very long script

Hi! I have to run a very long script. I use a ssh client on Windows in order to connect to a HP-UX box. What I try to avoid is the possibility that the Windows machine reboots or loses the connection to the Unix machine before the script finishes. Somebody told me that xterm could help me. He... (2 Replies)
Discussion started by: Ricardo Vargas
2 Replies
llrintd64(3M)															     llrintd64(3M)

NAME
llrintd64(), llrintd128(), llrintd32() - decimal round to nearest long long functions SYNOPSIS
DESCRIPTION
rounds its argument to the nearest value, rounding according to the current (decimal) rounding direction mode. is equivalent to except that it rounds to instead of is a version of it takes a argument. is a version of it takes a argument. 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 x is or NaN or the rounded value is outside the range of then returns the minimum value and raises the invalid floating-point exception. If the rounded value is within the range of then raises the inexact exception if the result differs in value from the argument. ERRORS
If x is NaN, sets to If x is or the rounded value is outside the range of sets to SEE ALSO
ceild64(3M), fabsd64(3M), fe_dec_getround(3M), fe_dec_setround(3M), floord64(3M), fmodd64(3M), llroundd64(3M), lrintd64(3M), lroundd64(3M), rintd64(3M), roundd64(3M), truncd64(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 llrintd64(3M)
All times are GMT -4. The time now is 05:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy