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

Home » Public Forums » archive » Re: Combination
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: Combination [message #75399] Mon, 28 February 2011 13:43
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
Got it... thanks, Carsten.
Re: Combination [message #75400 is a reply to message #75399] Mon, 28 February 2011 13:40 Go to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
Hi David,

I guess so. I love the melodrama in the opening paragraph, btw :) ... just hope I didn't sound like that.

round(c) it is!

Thanks again.
Re: Combination [message #75401 is a reply to message #75400] Mon, 28 February 2011 13:12 Go to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
fgg wrote:
> IDL> c = factorial(21)/(factorial(3)*factorial(21-3))
> IDL> print, c
> 1330.0000

WYSINWYG (what you see is NOT what you get):

IDL> print, c, format='(D50)'
1329.9999999999995453
IDL> print, LONG(c)
1329


HTH, chl
Re: Combination [message #75402 is a reply to message #75401] Mon, 28 February 2011 13:02 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
fgg writes:

> I should probably know this by now... what's going on below?
>
> IDL> c = factorial(21)/(factorial(3)*factorial(21-3))
> IDL> print, c
> 1330.0000
> IDL> myvec = dblarr(c)
> IDL> help, myvec
> MYVEC DOUBLE = Array[1329]
>
> I'd like myvec to have 1330 elements... not 1329.

I would guess yet another instance of the "Sky is Falling." :-)

http://www.idlcoyote.com/math_tips/sky_is_falling.html

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Combination
Next Topic: How to look up the directory tree for calling external DLLs?

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

Current Time: Wed Oct 08 15:49:12 PDT 2025

Total time taken to generate the page: 0.00630 seconds