forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Kinds
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6593
Location: Salford, UK

PostPosted: Wed Oct 28, 2009 9:15 pm    Post subject: Reply with quote

I do not have the answer to your question but I can ask and get back to you later. It would help if you could explain why the question is important to you.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6593
Location: Salford, UK

PostPosted: Thu Oct 29, 2009 8:32 am    Post subject: Reply with quote

Here is some information from our expert:

All the data types, Real*4, Real*8, Real*10, Integer*1, Integer*2, Integer*4, and Integer*10 are implemented in hardware - although some operations may involve more than one instruction. The coprocessor actually contains instructions to process Integer*8 data. It can't process Integer*10 data, because the 10 bytes is partly consumed by the exponent.

Silverfrost Fortran only supports native data types, so Integer*6 is not supported. However, if you need to pack data using this precision, why not equivalence an integer*8 to a Character*8 data item (a Silverfrost Fortran extension) and just keep the first 6 bytes (i.e. characters) of the result (the PC architecture takes the first byte as the one with least significance).
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 474
Location: Sunderland

PostPosted: Fri Oct 30, 2009 1:23 pm    Post subject: Reply with quote

Thats OK for storing, but on retrieval, the two most significance bytes of the integer*8 would need to be set to 0000h or FFFFh for positive and negative numbers respectively.

Secondly for Eddie refered to Real*6 for FEA work, which is where the real saving would be and the truncation and re-instatement of Real*6 from Real*8 would be difficult with respect to the size of the exponent and its sign bit, and less so for the mantissa and its sign bit, the mantissa, usually being left justified with an appropriate increment or decrement of the exponent.

What is the format of a Real*8?

Ian
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6593
Location: Salford, UK

PostPosted: Fri Oct 30, 2009 5:40 pm    Post subject: Reply with quote

I would have to look this up.

Try http://en.wikipedia.org/wiki/IEEE_754-2008.

Or equivalence to an INTEGER*8 and display the result in hexadecimal.
This will show you the sign bit, the exponent and the mantisa. The help file gives you some idea of the range under the heading of Real KINDs.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group