Internal representation of double


 
Thread Tools Search this Thread
Top Forums Programming Internal representation of double
# 8  
Old 09-17-2010
Quote:
Consider that %f works with doubles and floats even though they're different sizes. stdargs has no way to warn printf which is used, so the compiler must be converting them to something consistent. So if double-precision works in printf at all, they're all being passed as doubles, and all being used as doubles, not floats.
All the implementations of printf that I have seen explicitly convert all floats to doubles in the code and do not leave it up to the compiler to decide whether to or not.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

How bit representation of a number can be done in c?

I have an assignment in which a character is the input of which some bits(from a position to certain position) are to be inverted (1's complement) and then the resultant character is to be returned....for example unsigned char x = J from p = 3 to offset n = 5 01001010 inverted to... (1 Reply)
Discussion started by: ezee
1 Replies

2. UNIX and Linux Applications

Graphical Representation of mpstat.out file

hi everyone, We've generated mpstat.out file monitoring cpu utilization and the file is ready now.Wanted to generate graphical charts for the same output data. Can anyone pleas suggest tool for the same.? (1 Reply)
Discussion started by: Kathraji
1 Replies

3. Homework & Coursework Questions

Splitting a numbers binary representation for a double.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Split a 64bit hexadecimal number into two 32 bit numbers or keys. 2. Relevant commands, code, scripts,... (5 Replies)
Discussion started by: robin_simple
5 Replies

4. Shell Programming and Scripting

Convert a matrix to sparse representation

Hi All, I have a matrix stored in a file matrix.mtx and looks like this: 1 0.5 0.33 0.25 0 0.33 0.25 0.2 0 0 0 0.16 0 0 0 0.14 I want to convert this matrix to its sparse representation like the one give below (sparse_matrix.mtx). This means that above matrix has been converted to its... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. Programming

problems with pointers and internal representation.

I am trying to implement the representation in the attached file. class matriz { private: int fil,col; int **filaspointer; int *buffer; public: matriz(); matriz(int fil,int col); ... (3 Replies)
Discussion started by: lamachejo
3 Replies

6. Shell Programming and Scripting

Question on file owner name representation

Hi All, I came across a situation where i saw a directory name given below: drwxrwxrwx 5 121973 staff 8192 Apr 26 23:47 arunpr Just for your info: 1. All our application user ids are LDAP. 2. Hence we will not see any details of user in /etc/passwd file and i believe this could... (6 Replies)
Discussion started by: Arunprasad
6 Replies

7. UNIX for Advanced & Expert Users

Forwarding internal internet packets to internal webserver using iptables

Hi, I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication. Can... (1 Reply)
Discussion started by: mshindo
1 Replies

8. Solaris

Disk Representation - what is this c1t1d0s2 represent?

Hi All, Can you please advise what the 't' letters stands for? I understand the letter for the following "c1t1d0s2": c = disk Controller t = ? d = disk number ID. s = slice or partition of the disk Thanks (2 Replies)
Discussion started by: tlee
2 Replies
Login or Register to Ask a Question
NEXTAFTER(3)							libc math functions						      NEXTAFTER(3)

NAME
nextafter, nexttoward - floating point number manipulation SYNOPSIS
#include <math.h> double nextafter(double x, double y); float nextafterf(float x, float y); long double nextafterl(long double x, long double y); double nexttoward(double x, long double y); float nexttowardf(float x, long double y); long double nexttowardl(long double x, long double y); DESCRIPTION
The nextafter() functions return the next representable neighbor of x in the direction towards y. The size of the step between x and the result depends on the type of the result. If x = y the function simply returns y. If either value is NaN, then NaN is returned. Other- wise a value corresponding to the value of the least significant bit in the mantissa is added or subtracted, depending on the direction. The nexttoward() functions do the same as the nextafter() functions, except that they have a long double second argument. These functions will signal overflow or underflow if the result goes outside of the range of normalized numbers. CONFORMING TO
C99. This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854). SEE ALSO
nearbyint(3) GNU
2002-08-10 NEXTAFTER(3)