comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: factorial in PV-WAVE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: factorial in PV-WAVE [message #8746] Fri, 11 April 1997 00:00
dan is currently offline  dan
Messages: 27
Registered: March 1993
Junior Member
In article <5ilsb9$d2r@ovid.dra.hmg.gb>, black@signal.dra.hmg.gb (John Black) writes:
|> Am I misssing something, but in PV-WAVE (we're still on version 5 here) is
|> there no supplied factorial function, ie a function or operator that performs
|> for integer n the product of all the integers between 1 and n?
|>
|> If there isn't this is an omission. Is this omission corrected in later
|> versions of PV-WAVE?
|>
|> Also there doesn't seem to be a function that takes the product of the numbers
|> in an array.
|>
|> Ok these things can be easily written, but it does seem an astounding omission!
|>
|> John Black.
|>
|>
|>

How about

a = findgen(10) + 1.

afactorial = exp(total(alog(a)))
--
************************************************************ ***
** Dan Bergmann dbergmann@llnl.gov **
** Atmospheric Science Division fax (510) 423-4908 **
** Lawrence Livermore National Lab human (510) 423-6765 **
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: wrapping images around cylinders
Next Topic: factorial in PV-WAVE

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 03:02:59 PDT 2025

Total time taken to generate the page: 1.59944 seconds