Getting whole and fractional part of a float 
Author Message
 Getting whole and fractional part of a float

Hello,

Could someone give me some hints on how to extract the fractional or the
whole part of a float (double) on a PowerPC? I'm not asking for a 32 or
64 bit integer rounding or truncation, the end result must still be a
float, just stripped from its whole or fractional part.

Thanks,

Jonas



Mon, 17 Oct 2005 05:05:06 GMT  
 Getting whole and fractional part of a float

Quote:

> Could someone give me some hints on how to extract the fractional
> or the whole part of a float (double) on a PowerPC? I'm not asking
> for a 32 or 64 bit integer rounding or truncation, the end result
> must still be a float, just stripped from its whole or fractional
> part.

In what language?

--

   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!



Mon, 17 Oct 2005 10:09:50 GMT  
 Getting whole and fractional part of a float
On Wed, 30 Apr 2003 23:05:06 +0200, Jonas Maebe

Quote:

>Hello,

>Could someone give me some hints on how to extract the fractional or the
>whole part of a float (double) on a PowerPC? I'm not asking for a 32 or
>64 bit integer rounding or truncation, the end result must still be a
>float, just stripped from its whole or fractional part.

I don't know if these functions are in your Pascal, but the Frac() and
Int() functions do just what you're asking in mine.

Or are you writing those functions yourself?  If so, "never mind".

Duncan Murdoch



Mon, 17 Oct 2005 10:26:42 GMT  
 Getting whole and fractional part of a float
Wirth had an example of code to do this in "Pascal users manual and report".

Quote:

> Hello,

> Could someone give me some hints on how to extract the fractional or the
> whole part of a float (double) on a PowerPC? I'm not asking for a 32 or
> 64 bit integer rounding or truncation, the end result must still be a
> float, just stripped from its whole or fractional part.

> Thanks,

> Jonas

--
From minor faults, huge problems grow.


Mon, 17 Oct 2005 11:54:55 GMT  
 Getting whole and fractional part of a float

Quote:


> > Could someone give me some hints on how to extract the fractional
> > or the whole part of a float (double) on a PowerPC? I'm not asking
[snip]

> In what language?

Oops! Thanks for your and the other replies, but I meant to post this to
comp.sys.powerpc.misc, not comp.lang.pascal.misc :/ So I'm talking about
PowerC assembler (to implement the standard Pascal functions).

Sorry again,

Jonas



Mon, 17 Oct 2005 17:05:58 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Learner not getting 1st part of procedure to run

2. SQL: Searching for exact phrase / whole word

3. Resizing the whole Desktop

4. Checking for a whole number

5. The whole program so far... suggestions please

6. whole dir listings...

7. check if whole/integer

8. Grabing whole win95 screen in Delphi/help pls/

9. passing whole arrays as parameters

10. Re - Fill whole scree

11. Re - Fill whole screen

12. How to get the whole segment in TP7 ?

 

 
Powered by phpBB® Forum Software