Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Division still cost more than multiplication?

  • To: mathgroup at
  • Subject: [mg24253] Division still cost more than multiplication?
  • From: AES <siegman at>
  • Date: Wed, 5 Jul 2000 23:10:35 -0400 (EDT)
  • Organization: Stanford University
  • Sender: owner-wri-mathgroup at

Old-time FORTRAN programmers (like me) were taught (at least in early 
days) that division cost a lot more machine cycles than multiplication.  
So, if you had an expression like  y = x/c  that was going to be called 
many times inside a loop, where x and y were variables and c a constant, 
you'd code this as:

   (Outside the loop)

      cInverse = 1/c;

   (Begin loop structure)

      y = cInverse * x

Does this still make any sense in Mathematica?  Or is it a primitive 
relic of long-gone days?

  • Prev by Date: Re: unexpected Simplify[] ouput
  • Next by Date: Findminimum Question
  • Previous by thread: Urgent reply
  • Next by thread: Re: Division still cost more than multiplication?