PC Review


Reply
Thread Tools Rate Thread

ALU/FPU register width performance impact on big number computing?

 
 
Bubba
Guest
Posts: n/a
 
      2nd Mar 2005
Greetings to everyone,

If we take a processor with 16bit precise ALU and try to compute a
factorial (n!) form 2^80, what happens with ALU then? To be more precise,
does ALU width (precision) limits it from computing numbers higher than it
can allocate and how (if?) does it impacts performance of integer
computing? In other words, how come it is possible to compute very large
number if ALU is not precise enough for them (or my calculator is being
dishonest).

I hope I made my point clearly enough. Thanks in advance.


--
Kupio sam pistolj od svercera na crno,
Na tebe cu rado da potrosim zrno...
 
Reply With Quote
 
 
 
 
GSV Three Minds in a Can
Guest
Posts: n/a
 
      2nd Mar 2005
Bitstring <Xns960DE2CE896C7bubbachipsetone@130.133.1.4>, from the
wonderful person Bubba <(E-Mail Removed)> said
>Greetings to everyone,
>
>If we take a processor with 16bit precise ALU and try to compute a
>factorial (n!) form 2^80, what happens with ALU then? To be more precise,
>does ALU width (precision) limits it from computing numbers higher than it
>can allocate and how (if?) does it impacts performance of integer
>computing? In other words, how come it is possible to compute very large
>number if ALU is not precise enough for them (or my calculator is being
>dishonest).


All sensible math packages (for big numbers) break the calculation up
into smaller sized (i.e. 16 bit, 32 bit, whatever) pieces. Some simple
ones designed for very long numbers actually work in binary coded
decimal, and do long multiplication the 'very hard' way.

BTW, even 16 bit ALUs generally have a 16bit*16bit multiply, which will
give a 32 bit answer (in two registers).

Google is your friend (and yep, this sounds suspiciously like a homework
assignment, so hints is all you get).

--
GSV Three Minds in a Can
SC recommends the use of Firefox; Get smart, or get assimilated.
 
Reply With Quote
 
Yousuf Khan
Guest
Posts: n/a
 
      3rd Mar 2005
Bubba wrote:
> Greetings to everyone,
>
> If we take a processor with 16bit precise ALU and try to compute a
> factorial (n!) form 2^80, what happens with ALU then? To be more precise,
> does ALU width (precision) limits it from computing numbers higher than it
> can allocate and how (if?) does it impacts performance of integer
> computing? In other words, how come it is possible to compute very large
> number if ALU is not precise enough for them (or my calculator is being
> dishonest).
>
> I hope I made my point clearly enough. Thanks in advance.


The really large numbers (or the really small ones too) are worked on
inside the FPU rather than the ALU. The floating point unit gives up
some level of precision for some flexibility in estimation.

Yousuf Khan
 
Reply With Quote
 
Keith R. Williams
Guest
Posts: n/a
 
      3rd Mar 2005
In article <Xns960DE2CE896C7bubbachipsetone@130.133.1.4>,
(E-Mail Removed) says...
> Greetings to everyone,
>
> If we take a processor with 16bit precise ALU and try to compute a
> factorial (n!) form 2^80, what happens with ALU then? To be more precise,
> does ALU width (precision) limits it from computing numbers higher than it
> can allocate and how (if?) does it impacts performance of integer
> computing? In other words, how come it is possible to compute very large
> number if ALU is not precise enough for them (or my calculator is being
> dishonest).


The same way you do arithmetic only knowing the 9x9 tables.

--
Keith
 
Reply With Quote
 
Robert Myers
Guest
Posts: n/a
 
      10th Mar 2005
On Wed, 02 Mar 2005 22:46:18 -0500, Yousuf Khan <(E-Mail Removed)>
wrote:

>Bubba wrote:
>> Greetings to everyone,
>>
>> If we take a processor with 16bit precise ALU and try to compute a
>> factorial (n!) form 2^80, what happens with ALU then? To be more precise,
>> does ALU width (precision) limits it from computing numbers higher than it
>> can allocate and how (if?) does it impacts performance of integer
>> computing? In other words, how come it is possible to compute very large
>> number if ALU is not precise enough for them (or my calculator is being
>> dishonest).
>>
>> I hope I made my point clearly enough. Thanks in advance.

>
>The really large numbers (or the really small ones too) are worked on
>inside the FPU rather than the ALU. The floating point unit gives up
>some level of precision for some flexibility in estimation.
>


Stirling's approximation.

http://mathworld.wolfram.com/Stirlin...oximation.html

RM
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
measuring performance impact Saqib Ali Windows XP Performance 1 8th Feb 2007 02:41 AM
Impact on deterministicness and performance boris.unterer@gmail.com Microsoft Dot NET 0 12th May 2006 06:53 PM
Dataset performance impact Magnus Microsoft C# .NET 7 17th Apr 2006 11:11 AM
Performance impact? Oscar Thornell Microsoft C# .NET 4 23rd Oct 2005 07:22 PM
Performance Impact: By Reference or By Value TheVisionThing Microsoft Excel Programming 4 25th Mar 2005 05:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:31 AM.