Mercurial > octave
view liboctave/external/ranlib/gennor.f @ 33636:3ec6fcce7715 default tip @
gui: Avoid using HAVE_QSCINTILLA in more header files.
* gui-settings.h, settings-dialog.h: Don't include QScintilla header.
Forward-declare QSciLexer class instead if necessary. Declare all member
functions unconditionally.
* gui-settings.cc (gui_settings::get_valid_lexer_styles,
gui_settings::read_lexer_settings),
settings-dialog.cc (settings_dialog::update_lexer,
settings_dialog::get_lexer_settings, settings_dialog::write_lexer_settings):
Define functions unconditionally.
* gui-preferences-ed.h: Don't include QScintilla header. Remove definition of
local variable os_eol_mode from header.
* gui-preferences-ed.cc (os_eol_mode): Move definition of local variable here.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 28 May 2024 14:54:58 +0200 |
parents | f4d4d83f15c5 |
children |
line wrap: on
line source
REAL FUNCTION gennor(av,sd) C********************************************************************** C C REAL FUNCTION GENNOR( AV, SD ) C C GENerate random deviate from a NORmal distribution C C C Function C C C Generates a single random deviate from a normal distribution C with mean, AV, and standard deviation, SD. C C C Arguments C C C AV --> Mean of the normal distribution. C REAL AV C C SD --> Standard deviation of the normal distribution. C REAL SD C JJV (SD >= 0) C C GENNOR <-- Generated normal deviate. C REAL GENNOR C C C Method C C C Renames SNORM from TOMS as slightly modified by BWB to use RANF C instead of SUNIF. C C For details see: C Ahrens, J.H. and Dieter, U. C Extensions of Forsythe's Method for Random C Sampling from the Normal Distribution. C Math. Comput., 27,124 (Oct. 1973), 927 - 937. C C C********************************************************************** C .. Scalar Arguments .. REAL av,sd C .. C .. External Functions .. REAL snorm EXTERNAL snorm C .. C .. Executable Statements .. C JJV added check to ensure SD >= 0.0 IF (sd.GE.0.0) GO TO 10 WRITE (*,*) 'SD < 0.0 in GENNOR - ABORT' WRITE (*,*) 'Value of SD: ',sd CALL XSTOPX ('SD < 0.0 in GENNOR - ABORT') 10 gennor = sd*snorm() + av RETURN END