line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Symbolic::Custom::ErrorPropagation;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
195873
|
use 5.006;
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings;
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
37
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp qw/croak carp cluck confess/;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Math::Symbolic::Custom::Base;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
44
|
|
9
|
1
|
|
|
1
|
|
20
|
BEGIN { *import = \&Math::Symbolic::Custom::Base::aggregate_import }
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Math::Symbolic::ExportConstants qw/:all/;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
422
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.11';
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $Aggregate_Export = [qw/apply_error_propagation/];
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub apply_error_propagation {
|
17
|
3
|
|
|
3
|
1
|
68063
|
my ( $f, @elements ) = @_;
|
18
|
|
|
|
|
|
|
|
19
|
3
|
100
|
|
|
|
24
|
return Math::Symbolic::Constant->zero() if not @elements;
|
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
4
|
my $formula;
|
22
|
2
|
|
|
|
|
13
|
foreach my $element (@elements) {
|
23
|
3
|
|
|
|
|
215
|
$formula +=
|
24
|
|
|
|
|
|
|
Math::Symbolic::Variable->new("sigma_$element")**2 *
|
25
|
|
|
|
|
|
|
Math::Symbolic::Operator->new( 'partial_derivative', $f,
|
26
|
|
|
|
|
|
|
Math::Symbolic::Variable->new($element) )**2;
|
27
|
|
|
|
|
|
|
}
|
28
|
2
|
|
|
|
|
488
|
$formula = sqrt($formula);
|
29
|
2
|
|
|
|
|
77
|
return $formula;
|
30
|
|
|
|
|
|
|
}
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1;
|
33
|
|
|
|
|
|
|
__END__
|