/usr/share/gnudatalanguage/lib/stddev.pro is in libgnudatalanguage0 0.9.7-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | ;$Id: stddev.pro,v 1.3 2012/07/13 22:28:02 alaingdl Exp $
;
function STDDEV, x, double=double, NaN=NaN, dimension=dimension
;
;+
;
; NAME: STDDEV
;
; PURPOSE:
; Calculates the standard deviation of the input data
;
; CATEGORY:
; Mathematics: Statistics
;
; CALLING SEQUENCE:
; Result=STDDEV(x)
;
; KEYWORD PARAMETERS:
; DOUBLE : Keyword for double precision calculation
; NAN : Flag to treat IEEE Special Floating-Point values as missing data
; DIMENSION : if absent or equal to zero, compute the variance over the
; whole data. otherwise, compute along the related dimension.
;
; OUTPUTS:
; Result is the standard deviation of input data
;
; RESTRICTIONS:
; The input x needs to be an array of numbers (i.e not strings,
; struct, ptr, object)
;
; PROCEDURE:
; standard deviation = sqrt(variance)
; Uses the MOMENT function
;
; EXAMPLE:
; a=FINDGEN(100)
; result=STDDEV(a)
; print, result
; 29.0115
;
; MODIFICATION HISTORY:
; 20-Mar-2004 : Written by Christopher Lee
; 18-Jul-2005 : PC, moment.pro update
; 13-Jul-2012 : Alain Coulais : adding DIMENSION keyword, using MOMENT()
;
; LICENCE:
; Copyright (C) 2004, Christopher Lee, 2005 P. Chanial, 2012 Alain Coulais
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
;-
;
ON_ERROR, 2
;
tmp=MOMENT(x, sdev=sdev, double=double, NaN=NaN, $
dimension=dimension, maxmoment=2)
;
return, sdev
;
end
|