Skip to content

Commit

Permalink
only changes comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Jan 7, 2017
1 parent 5239233 commit eb41166
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions fityk/bfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ void FuncVoigt::more_precomputations()
}

CALCULATE_VALUE_BEGIN(FuncVoigt)
// humdev/humlik routines require with y (a3 here) parameter >0.
// humdev/humlik routines require the y (a3 here) parameter >0.
float k;
realt xa1a2 = (x - av_[1]) / av_[2];
k = humlik(xa1a2, fabs(av_[3]));
Expand Down Expand Up @@ -585,15 +585,15 @@ void FuncVoigtA::more_precomputations()
}

CALCULATE_VALUE_BEGIN(FuncVoigtA)
// humdev/humlik routines require with y (a3 here) parameter >0.
// humdev/humlik routines require the y (a3 here) parameter >0.
float k;
realt xa1a2 = (x - av_[1]) / av_[2];
k = humlik(xa1a2, fabs(av_[3]));
CALCULATE_VALUE_END(av_[0] / (sqrt(M_PI) * av_[2]) * k)

CALCULATE_DERIV_BEGIN(FuncVoigtA)
// humdev/humlik routines require with y (a3 here) parameter >0.
// here fabs(av_[3]) is used, and dy_dv[3] is negated if av_[3]<0.
// humdev/humlik routines require the y (a3 here) parameter >0.
// Here fabs(av_[3]) is used, and dy_dv[3] is negated if av_[3]<0.
float k;
realt xa1a2 = (x-av_[1]) / av_[2];
realt f = av_[0] / (sqrt(M_PI) * av_[2]);
Expand Down
4 changes: 1 addition & 3 deletions fityk/voigt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// fastest_humlik.for and humdev.for - from Bob Wells Voigt Function Page
// http://www.atm.ox.ac.uk/user/wells/voigt.html
// http://web.archive.org/web/20100503005358/http://www.atm.ox.ac.uk/user/wells/voigt.html
// Translated to C++ with f2c program and modified by M.W.
// It can be slower than original, I haven't compared the speed.

Expand All @@ -10,7 +10,6 @@

/// Calculates the Faddeeva function
/// and partial derivatives of the Voigt function for y>=0
/// (from http://www.atm.ox.ac.uk/user/wells/voigt.html)
/// arguments:
/// x, y - Faddeeva/Voigt function arguments
/// k - voigt -- output
Expand Down Expand Up @@ -234,7 +233,6 @@ void humdev(const float x, const float y,


/// Calculates the Faddeeva function with relative error less than 10^(-4).
/// (from http://www.atm.ox.ac.uk/user/wells/voigt.html)
/// arguments:
/// x, y - Faddeeva/Voigt function arguments
/// return value -- voigt
Expand Down
4 changes: 2 additions & 2 deletions fityk/voigt.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

/// calculates the Faddeeva function
/// and partial derivatives of the Voigt function for y>=0
/// (from http://www.atm.ox.ac.uk/user/wells/voigt.html)
/// Based on (now only in Wayback Machine):
/// http://web.archive.org/web/20100503005358/http://www.atm.ox.ac.uk/user/wells/voigt.html
void humdev(const float x, const float y,
float &k, float &l, float &dkdx, float &dkdy);
// arguments:
Expand All @@ -13,7 +14,6 @@ void humdev(const float x, const float y,


/// calculates the Faddeeva function with relative error less than 10^(-4).
/// (from http://www.atm.ox.ac.uk/user/wells/voigt.html)
float humlik(const float x, const float y);
// arguments:
// x, y - Faddeeva/Voigt function arguments
Expand Down

0 comments on commit eb41166

Please sign in to comment.