Project

General

Profile

Feature #1147

pow.h to cetlib?

Added by Rob Kutschke about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Infrastructure
Target version:
Start date:
04/05/2011
Due date:
% Done:

100%

Estimated time:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

Some time ago Walt wrote pow.h, a template that, at compile time, writes the code for the minimal multiply algorithm for evaluating an integer power. It also provided templates for square, cube and fourth power. I think that this is a good candidate for inclusion in cetlib.

We are currently using I put a slightly modified version that I put into the Mu2e repository.

http://cdcvs0.fnal.gov/cgi-bin/public-cvs/cvsweb-public.cgi/mu2e/Offline/GeneralUtilities/inc/pow.hh?rev=1.1&content-type=text/x-cvsweb-markup

I think that the mods were that Walt spelled square and cube as sqr and cub; and he did not provide fourth. I don't have a strong opinion on the spelling of sqr and cub in the code you commit. If you think that the right answer for a broader audience is sqr, cub, that's fine with me.

Rob

History

#1 Updated by Walter E Brown about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Walter E Brown
  • % Done changed from 0 to 90

#2 Updated by Walter E Brown about 9 years ago

  • Category set to Infrastructure
  • Status changed from Assigned to Resolved
  • % Done changed from 90 to 100

#3 Updated by Christopher Green about 9 years ago

  • Status changed from Resolved to Closed
  • Target version set to 0.06.02


Also available in: Atom PDF