Date: Tue, 30 Mar 2010 12:35:05 +0300 From: Alexander Motin <mav@FreeBSD.org> To: freebsd-arm@FreeBSD.org Subject: printf(long double) Message-ID: <4BB1C5C9.8000402@FreeBSD.org>
index | next in thread | raw e-mail
Hi.
Playing with SheevaPlug (Marvell 88F6281 rev A0) with fresh 9-CURRENT
I've found that many system statistics utilities are lying, showing
number few times smaller then expected. After some investigation I've
found that the problem possibly goes from different meaning of (long
double) type for compiler and printf() code.
I've written small test to check it:
#include <stdio.h>
int
main (void)
{
printf("%d %d\n", sizeof(long double), sizeof(double));
printf("%Lf %f %Lf %f\n", (long double)14.5, (long double)14.5,
(double)14.5, (double)14.5);
}
On amd64 it prints:
# ./a.out
16 8
14.500000 14.500000 14.500000 14.500000
But on arm:
%./a.out
8 8
6.500000 14.500000 6.500000 14.500000
Can somebody comment this?
--
Alexander Motin
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BB1C5C9.8000402>
