[OS X TeX] TeX request

George Dorner george at dorners.net
Sat Jun 25 21:27:43 EDT 2005


I enjoyed reading this thread since CS students here I teach like to  
(or are required to) do such computations and the more ways to do it,  
the more interesting the problem to them.

I called up my Maple and couldn't get a reading on how fast it  
computed 200!, so I entered tim():=top:2000!:tim()-top; and got 0.001  
sec, while tim():=top:2000!;tim()-top;  actually shows the digits and  
takes 0.004 seconds. This was on a dual processor G4. That's all the  
time I plan to spend on the problem.  8-)


geo


On Jun 24, 2005, at 9:49 AM, Jean-Claude DE SOZA wrote:

> Gerben,
>
> In a text file, enter :
>
> #!/usr/local/bin/ruby
> class Integer
>   def factorial
>     (1..self).inject(1) { |f, n| f * n }
>   end
> end
> puts 200.factorial
>
> Save it as fact.rb and run it with ./fact.rb or ruby fact.rb
> Jean-Claude DE SOZA
>
> Le 23 juin 05 à 22:24, Gerben Wierda a écrit :
>
>
>> Hello folks,
>>
>> I need help with a trick I want to perform. I want to be able to  
>> display all the digits of
>>
>> 2!
>> 10!
>> 200!
>>
>> I need some sort of perl, ruby, bc or other way to produce all the  
>> digits. Then I can use some TeX trickery (maybe from the  
>> diminuendo trick from the showcase, or crescendo) to display them
>>
>> G
>> --------------------- Info ---------------------
>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>           & FAQ: http://latex.yauh.de/faq/
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>>
>>
>> --------------------------------------------------------------------- 
>> ------------------
>> Wanadoo vous informe que cet  e-mail a ete controle par l'anti- 
>> virus mail.Aucun virus connu a ce jour par nos services n'a ete  
>> detecte.
>>
>>
>>
>>
>>
>
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>
>

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list