# [PD] Long long numbers

B. Bogart ben at ekran.org
Sat Dec 22 00:48:07 CET 2007

```I always wonder when you say large numbers and rotation...

Do you really need large numbers? I never checked if its slower to
rotateXYZ to 360*100 compared to rotation to 360.

.b.

Dafydd Hughes wrote:
> Thanks for your help, Mathieu and Roman
>
> As it turns out, while I don't want to perform calculations so much, I
> do need to translate these long numbers into rotations in Gem, so I
> need them more or less intact.
>
> Looks like it's Python for the crunching then.
>
> Thanks again!
>
> cheers
> dafydd
>
> On Dec 21, 2007 3:14 PM, Mathieu Bouchard <matju at artengine.ca> wrote:
>> On Fri, 21 Dec 2007, Roman Haefeli wrote:
>>
>>> i assume, you don't want to perform calculations with these big numbers.
>>> or better i should say, i hope, because this wouldn't be possible (at
>>> least with pd on 32bit machines).
>> Everything is possible. Try this:
>>
>>    ruby -e "p 3**33333"
>>
>> If you don't have explicit support for unlimitedly long numbers in a given
>> programming language, you can always add it by yourself in some way, by
>> performing the carries by yourself. For example, it takes N^2 plain
>> multiplications to compute multiplication of two numbers of N digits each,
>> if you do it the obvious way. One such "digit" can actually be a bunch of
>> digits in the base that you'd use if you'd be doing it on paper. For
>> example, Ruby does it using 32 bits as being one "digit" relatively to the
>> it fit with the processor or programming language. If Ruby didn't have it
>> and I wanted to add this feature to Ruby, I'd probably make my digits only
>> 30 bits each or perhaps even 15 bits, for speed and RAM reasons (the way
>> numbers are allocated in the specific case of Ruby).
>>
>>
>>   _ _ __ ___ _____ ________ _____________ _____________________ ...
>> | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
>
>
>

```