MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Compile a Module

  • To: mathgroup at
  • Subject: [mg83148] Compile a Module
  • From: JOHN ERB <john_c_erb at>
  • Date: Tue, 13 Nov 2007 03:35:52 -0500 (EST)

Can the following module be compiled?
  It needs to be used 10^4 times in my program.
  It is used to calculate the distance parallel and perpendicular
  to the midpoint of  2D line segment with reference to a point of interest (calc).
along=r Cos[theta];
away=r Sin[theta];
  AlongAway[{{-1, 0}, {1, 0}, {2, 1}}]
(* answer is {2,1} *)
  (* the code below does not seem to work *)
  John C. Erb

  • Prev by Date: Question about RandomInteger
  • Next by Date: Re: Pattern test and expression sequence
  • Previous by thread: Re: Question about RandomInteger
  • Next by thread: Re: Compile a Module