Sponsored Content
Full Discussion: long doubles
Top Forums Programming long doubles Post 33208 by Perderabo on Thursday 19th of December 2002 10:12:28 PM
Old 12-19-2002
There is no guarantee that long double is different from double, nor that double is different from float. You should be able to see the limits of each type by looking at <float.h>.

Hmmm...according to this fibonacci calculator, fib(10000) is an integer with 2090 digits. Your floating point unit is going to need a rather large mantissa. Good thing you went with long double.
 

9 More Discussions You Might Find Interesting

1. Programming

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... (1 Reply)
Discussion started by: Shobhit
1 Replies

2. 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

3. 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

4. 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

5. UNIX Desktop Questions & Answers

need help writing a program to look for doubles

to determine if two two doubles are equal, we check to see if their absolute difference is very close to zero. . .if two numbers are less than .00001 apart, theyre equal. keep a count field in each record (as you did in p5). once the list is complete, ask the user to see if an element is on... (2 Replies)
Discussion started by: rickym2626
2 Replies

6. 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

7. Shell Programming and Scripting

awk syntax mistake doubles desired output

I am trying to add a line to a BASH shell script to print out a large variable length table on a web page. I am very new to this obviously, but I tried this with awk and it prints out every line twice. What I am doing wrong? echo "1^2^3%4^5^6%7^8^9%" | awk 'BEGIN { RS="%"; FS="^"; } {for (i =... (6 Replies)
Discussion started by: awknewb123
6 Replies

8. UNIX for Dummies Questions & Answers

Remove Doubles Without Sort?

Hi! I have concatenated two files which are wordlists, i.e., one word per line. The new file contains some doubles, but I cannot use sort and uniq as I need to keep the sort order that it is already in, which is not alphabetical, and uniq only compares adjacent lines, and the doubles are not on... (15 Replies)
Discussion started by: sudon't
15 Replies

9. UNIX for Dummies Questions & Answers

Grep words with X doubles only

Hi! I'm trying to figure out how to find words with X number of doubles, only. I'm searching a dictionary, (one word per line). For instance, if you want to find words containing only one pair of double letters, you could do something like this: egrep '(.)\1' wordlist.txt |egrep -v '(.)\1.*(.)\2'... (3 Replies)
Discussion started by: sudon't
3 Replies
floor(3)						     Library Functions Manual							  floor(3)

NAME
floor, ceil, modf, nint, rint, trunc - Round floating-point numbers to floating-point integers, return the nearest integral value, and truncate a floating-point number LIBRARY
Math Library (libm.a) SYNOPSIS
#include <math.h> double floor (double x); float floorf (float x); long double floorl (long double x); double ceil (double x); float ceilf (float x); long double ceill (long double x); double modf (double x, double *n); float modff (float x, float *n); long double modfl (long double x, long double *n); double nint (double x); float nintf (float x); long double nintl (long double x); double rint (double x); float rintf (float x); long double rintl (long double x); double trunc (double x); float truncf (float x); long double truncl (long double x); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: floor(): XPG4 ceil(): XPG4 modf(): XPG4 rint(): XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The floor(), floorf(), and floorl() functions return the largest floating-point integer value less than or equal to x. The ceil(), ceilf(), and ceill() functions return the smallest floating-point integer value greater than or equal to x. The modf(), modff(), and modfl() functions split a floating-point number x into a fractional part f and an integer part i such that |f| < 1.0 and (f + i) = x. Both f and i have the same sign as x. The modf(), modff(), and modfl() functions return f and store i into the loca- tion pointed to by n. The nint(), nintf(), and nintl() functions return the nearest integral value to x, except halfway cases are rounded to the integral value larger in magnitude. This corresponds to the FORTRAN generic intrinsic function nint(). The rint(), rintf(), and rintl() functions round x to an integral value according to the current IEEE rounding direction specified by the user. The trunc(), truncf(), and truncl() functions truncate x to an integral value. delim off floor(3)
All times are GMT -4. The time now is 08:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy