Mercurial > octave
view liboctave/external/odepack/svnorm.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 SVNORM (N, V, W) C***BEGIN PROLOGUE SVNORM C***SUBSIDIARY C***PURPOSE Weighted root-mean-square vector norm. C***TYPE SINGLE PRECISION (SVNORM-S, DVNORM-D) C***AUTHOR Hindmarsh, Alan C., (LLNL) C***DESCRIPTION C C This function routine computes the weighted root-mean-square norm C of the vector of length N contained in the array V, with weights C contained in the array W of length N: C SVNORM = SQRT( (1/N) * SUM( V(i)*W(i) )**2 ) C C***SEE ALSO SLSODE C***ROUTINES CALLED (NONE) C***REVISION HISTORY (YYMMDD) C 791129 DATE WRITTEN C 890501 Modified prologue to SLATEC/LDOC format. (FNF) C 890503 Minor cosmetic changes. (FNF) C 930809 Renamed to allow single/double precision versions. (ACH) C***END PROLOGUE SVNORM C**End INTEGER N, I REAL V, W, SUM DIMENSION V(N), W(N) C C***FIRST EXECUTABLE STATEMENT SVNORM SUM = 0.0E0 DO 10 I = 1,N 10 SUM = SUM + (V(I)*W(I))**2 SVNORM = SQRT(SUM/N) RETURN C----------------------- END OF FUNCTION SVNORM ------------------------ END