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.

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

 Page 1 of 1 [ 5 post ]

Relevant Pages