This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Mathematical Funktions for H8/300h - double ?


Hello,

GCC (or egcs) for h8300(hms) handles both float and double the same 
way : as float.
Check the following example :

float a = 1.0000001;
double b = 1.0000001;

compiles as :

   1              	;	GCC For the Hitachi H8/300
   2              	;	By Hitachi America Ltd and Cygnus 
Support
   3              	;	release F-1
   4              	; -O2
   5              	
   6              		.h8300h
   7              		.file	"math.c"
   8              		.global _a
   9              		.section .data
  10              		.align 1
  11              	_a:
  12 0000 3F800001 		.float 1.00000011920928955078e0
  13              		.global _b
  14              		.align 1
  15              	_b:
  16 0004 3F800001 		.float 1.00000011920928955078e0
  17              		.section .text
  28              		.end


As you can see, a and b are the same and have the same "poor" 
precision.

Regards.



Giovanni Caterina
--------------------------------------------------------------------------
 e-mail : Giova@idtech.be
  ___ ____  _            _      IDtech S.A.        http://www.idtech.be
 |_ _|  _ \| |_ ___  ___| |__   62, rue Saucin
  | || | | | __/ _ \/ __| '_ \  B-5032 Gembloux    Tel : (32) 81/55.46.10
  | || |_| | ||  __/ (__| | | | Belgium            Fax : (32) 81/55.46.58
 |___|____/ \__\___|\___|_| |_| 
 Access Control, Time Attendance, Alarm Monitoring...      info@idtech.be
--------------------------------------------------------------------------
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]