package II632de5577077dd8ff86d3ccabaabac05; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; use IIef11385558db207cf8b1321ea6156940; use IIf404c8dfc046e4729558b9aff233579c; use II8c53c8f903d1ac9e95724345f8d56b85; use II83c37f21ffab8c86a1b80d37aa13d0f7; use IIa200171175f6418501995344a7b9f5e2; use IIc6aa3e82c386b089a6d7ec2e1ba751e0; BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IlIllllllllIllII=\%{pack('H6','7a750e')^'?;X'};*II632de5577077dd8ff86d3ccabaabac05::lIlIllllIIIlIlll=\&{pack('H24','285d2525006c267c63533600')^'E<LK:VUDT1N4'};$II632de5577077dd8ff86d3ccabaabac05::IlllIIIlllllIllI=pack('H18','0e1e666e0509096260')^'FJ2>ZAF14';$II632de5577077dd8ff86d3ccabaabac05::llllIlIIlllllllI=pack('H12','121f1e72030c')^'XVP>JO'};sub mnt_stats { my $class = shift; my $C = shift; my $in = $C->{INPUT}; my $splittest = IIef11385558db207cf8b1321ea6156940::IIlllIIlllIIIIII($IIa200171175f6418501995344a7b9f5e2::lIIIIlllIIllIIll{$II83c37f21ffab8c86a1b80d37aa13d0f7::lIlIllIlIllIllIl},113,$IIa200171175f6418501995344a7b9f5e2::lIIIIlllIIllIIll{$II8c53c8f903d1ac9e95724345f8d56b85::IllIllllllIIlIll})->search(id => $in->{test_id})->[0]; II632de5577077dd8ff86d3ccabaabac05::lIllIlllllllIlll($II632de5577077dd8ff86d3ccabaabac05::IIIllIIIIlIIIlIl{$II720d6e18aa34327713eb014408fc9144::IlIlIllIIIIIllll},130,$II632de5577077dd8ff86d3ccabaabac05::IIIllIIIIlIIIlIl{$II632de5577077dd8ff86d3ccabaabac05::IIllllIlIIllllII})->true($splittest, 'invalid link'); my $pc_format = "%.$splittest->{dec_prec}f%"; $C->{Splittest} = $splittest->getView; $C->{StepStartURI} = $splittest->getStep->getStepStartUri; my $dbc = $splittest->dbc; my $where = $class->getWhereForSplittest($splittest); my %pages; for my $r ($dbc->getRecords(<<END_SQL))
select splitpage_id,count(user_cookie) as nv,count(distinct user_cookie) as nuv
from jin_funnel_visit v
where $where
and action='display'
group by splitpage_id
END_SQL
{ $pages{$r->{splitpage_id}}{$_} = $r->{$_} for qw/nv nuv/; } for my $r ($dbc->getRecords(<<END_SQL))
select splitpage_id,count(distinct code) as na
from jin_funnel_visit v
where $where
and action in ('collectuserdata','userbyemail','addproduct','registration','login')
group by splitpage_id
END_SQL
{ $pages{$r->{splitpage_id}}{na} = $r->{na}; } $dbc->do(<<END_SQL);
create temporary table tmp_st_sales_$$ (
splitpage_id int(11) not null default 0,
sale_id int(11) not null default 0,
is_initial int(1) not null default 0,
amount decimal(10,2),
cost decimal(10,2),
key(splitpage_id)
) engine=heap
END_SQL
$dbc->do(<<END_SQL);
insert into tmp_st_sales_$$
select distinct splitpage_id,s.id,if(s.subscr_not_initial,0,1),s.amount,p.cost
from jin_funnel_visit v
inner join jin_sale s on
$where
and action='addproduct' and v.order_id!=0 and s.order_id=v.order_id and prod_id=param_id and s.paid=1 and s.refunded=0
left join jin_product p on p.id=param_id
END_SQL
for my $r ($dbc->getRecords(<<END_SQL))
select
splitpage_id, sum(is_initial) as num_init, sum(if(is_initial,amount,0)) as amt_init, sum(if(amount>0,1,0)) as num_pay, sum(amount) as amt_all, sum(if(is_initial,cost,0)) as cost_init
from tmp_st_sales_$$ t
group by splitpage_id
END_SQL
{ $pages{$r->{splitpage_id}}{"sales_$_"} = $r->{$_} for qw/num_init amt_init num_pay amt_all cost_init/; } $dbc->do(<<END_SQL);
drop table tmp_st_sales_$$
END_SQL
for my $sp_id (keys(%pages)) { my $h = $pages{$sp_id}; $h->{splitpage_id} = $sp_id; $h->{splitpage_title} = $dbc->getValue("select title from jin_funnel_splitpage where id=?", [$sp_id]); $h->{$_} += 0 for qw/nv nuv na ord paypord sales_num sales_num/; $h->{conv} = $h->{nuv} > 0 ? sprintf($pc_format, 100 * $h->{na} / $h->{nuv}) : 0; $h->{ci} = sprintf($pc_format, $h->{nuv} ? 100 * _calc_ci($h->{na} / $h->{nuv}, $h->{nuv}, 80) : 0 ); $h->{profit} = $h->{sales_amt_all} - $h->{sales_cost_init}; $h->{vpv} = sprintf("%.2f", $h->{profit} / $h->{nuv}) if $h->{nuv}; $h->{$_} = ($h->{$_} + 0 > 0 ? IIc6aa3e82c386b089a6d7ec2e1ba751e0::llllIlllIIllIlII($IIef11385558db207cf8b1321ea6156940::IIlIllllllllIIlI{$IIc6aa3e82c386b089a6d7ec2e1ba751e0::lIIIIIIIlllllIIl},81,$IIef11385558db207cf8b1321ea6156940::IIlIllllllllIIlI{$IIf404c8dfc046e4729558b9aff233579c::lIIlIIlIIIIlIlII})->formatAmount($h->{$_}) : '') for qw/sales_amt_init sales_amt_all sales_cost_init profit vpv/; } $C->{Data} = [sort { $b->{nv} <=> $a->{nv} } values %pages]; return; } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::llIIlIIlllllIlIl=\%{pack('H6','731a1e')^'6TH'};*II632de5577077dd8ff86d3ccabaabac05::IIIIIlllIIllIIII=\&{pack('H24','5f55585a71714d7709532f07')^'2414KK>O>1W3'};$II632de5577077dd8ff86d3ccabaabac05::lIIIIIllllIlIIll=pack('H18','066b61616a7f760a14')^'N?51579Y@';$II632de5577077dd8ff86d3ccabaabac05::IllllIIlIllIIlII=pack('H12','100579087b7b')^'ZL7D28'};sub getWhereForSplittest { my $class = shift; my $splittest = shift; my $where = "v.funnel_id='$splittest->{funnel_id}' and v.step_id='$splittest->{step_id}'"; my $dbc = $splittest->dbc; $where .= ' and v.tstamp_start >= ' . $dbc->quote($splittest->{datetime_from}) if $splittest->{datetime_from}; $where .= ' and v.tstamp_start <= ' . $dbc->quote($splittest->{datetime_to}) if $splittest->{datetime_to}; if (my $users = $splittest->{testusers}) { $users = join ',', grep { /^\d+$/ } split ',', $users; $where .= " and (v.user_id=0 or not find_in_set(v.user_id,'$users'))" if $users; } if (my $ips = $splittest->{testips}) { $ips =~ s/[^0-9\.,]//g; $ips = join ',', grep { length } split ',', $ips; $where .= " and (v.user_ip='' or not find_in_set(v.user_ip,'$ips'))" if $ips; } $where; } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IlIlIllIlIIIIIIl=\%{pack('H6','010210')^'DLF'};*II632de5577077dd8ff86d3ccabaabac05::IIIIIIIIIllIllII=\&{pack('H24','3a5a28587800257a09264006')^'W;A6B:VB>D82'};$II632de5577077dd8ff86d3ccabaabac05::lIllIlIlllIIIllI=pack('H18','01121262607b706501')^'IFF2?3?6U';$II632de5577077dd8ff86d3ccabaabac05::IIllllIlIIllllII=pack('H12','181b181a797a')^'RRVV09'};sub mnt_sales_report { my $class = shift; my $C = shift; my $in = $C->{INPUT}; my $funnel_id = $in->{TabCustom1}; my $funnel = IIf404c8dfc046e4729558b9aff233579c::llIlIllIIIIIIllI($II632de5577077dd8ff86d3ccabaabac05::IlIllllllllIllII{$II83c37f21ffab8c86a1b80d37aa13d0f7::lIllIIIlIIllIIll},126,$II632de5577077dd8ff86d3ccabaabac05::IlIllllllllIllII{$II83c37f21ffab8c86a1b80d37aa13d0f7::lllIIIIIlllIIlll})->search(id => $funnel_id)->[0]; IIf404c8dfc046e4729558b9aff233579c::lIIIlllllIlllIll($II632de5577077dd8ff86d3ccabaabac05::IIIllIIIIlIIIlIl{$IIc6aa3e82c386b089a6d7ec2e1ba751e0::lIIIIIIIlllllIIl},130,$II632de5577077dd8ff86d3ccabaabac05::IIIllIIIIlIIIlIl{$IIc6aa3e82c386b089a6d7ec2e1ba751e0::lllIlIllllllIIlI})->true($funnel, 'invalid link'); my $dbc = IIc6aa3e82c386b089a6d7ec2e1ba751e0::IlIIlllllIlIlIIl($II632de5577077dd8ff86d3ccabaabac05::IlIllllllllIllII{$IIf404c8dfc046e4729558b9aff233579c::lllIIIlIlIlIlllI},126,$II632de5577077dd8ff86d3ccabaabac05::IlIllllllllIllII{$IIef11385558db207cf8b1321ea6156940::IllIlIIlIIIIIllI})->dbc; my $where_funnel = $in->{step_id} =~ /^\d+$/ ? "funnel_id=? and step_id=$in->{step_id}" : 'funnel_id=?'; my $where_search = ''; for my $f (qw/date_from date_to/) { $in->{$f} = $in->{$f} =~ /^(\d{2})\.(\d{2})\.(\d{4})$/ ? "$3\-$2\-$1" : undef; } $where_search .= " and tstamp_start >= '$in->{date_from} 00:00:00'" if $in->{date_from}; $where_search .= " and tstamp_start <= '$in->{date_to} 23:59:59'" if $in->{date_to}; my %totals = ( nuv => 0, sales_amt_all => 0, vpv_all => 0 ); my %steps; $dbc->do(<<END_SQL);
create temporary table tmp_sr_sales_$$ (
step_id int(11) not null default 0,
splitpage_id int(11) not null default 0,
prod_id int(11) not null default 0,
sale_id int(11) not null default 0,
is_initial int(1) not null default 0,
amount decimal(10,2),
key(step_id,splitpage_id,prod_id)
) engine=heap
END_SQL
$dbc->do(<<END_SQL, [$funnel_id]);
insert into tmp_sr_sales_$$
select distinct step_id,splitpage_id,s.prod_id,s.id,if(s.subscr_not_initial,0,1),s.amount
from jin_funnel_visit v
inner join jin_sale s on
$where_funnel
$where_search
and action='addproduct' and v.order_id!=0 and s.order_id=v.order_id
and prod_id=param_id
and paid=1 and refunded=0
END_SQL
if ($in->{sales_list}) { if (my ($type, $step_id, $splitpage_id, $prod_id) = $in->{sales_list} =~ m!^(init|pay)\-(\d+)-(\d+)-(\d+)!) { my $where_type = $type eq 'init' ? 'is_initial=1' : 'amount>0'; my @sale_ids = grep { $_ } $dbc->getColumn("select sale_id from tmp_sr_sales_$$ t where step_id=? and splitpage_id=? and prod_id=? and $where_type", [$step_id, $splitpage_id, $prod_id]); Zen->getRequest->redirectPOST(IIef11385558db207cf8b1321ea6156940::IIlllIIlllIIIIII($II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$IIf404c8dfc046e4729558b9aff233579c::IIIIllIIlIlIllll},47,$II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$IIef11385558db207cf8b1321ea6156940::IllIlIIlIIIIIllI})->getURL . "/master/customers/sales.html", { sea_ids_only => join(',', @sale_ids) }); } } for my $r ($dbc->getRecords(<<END_SQL))
select
step_id,splitpage_id,prod_id, sum(is_initial) as num_init, sum(if(is_initial,amount,0)) as amt_init, sum(if(amount>0,1,0)) as num_pay, sum(amount) as amt_all
from tmp_sr_sales_$$ t
group by step_id,splitpage_id,prod_id
END_SQL
{ $steps{$r->{step_id}}{$r->{splitpage_id}}{prods}{$r->{prod_id}}{"sales_$_"} = $r->{$_} for qw/num_init amt_init num_pay amt_all/; } $dbc->do(<<END_SQL);
drop table tmp_sr_sales_$$
END_SQL
for my $r ($dbc->getRecords(<<END_SQL, [$funnel_id]))
select step_id,splitpage_id,count(distinct user_cookie) as nuv
from jin_funnel_visit
where $where_funnel $where_search and action='display'
group by step_id,splitpage_id
END_SQL
{ $steps{$r->{step_id}}{$r->{splitpage_id}}{nuv} = $r->{nuv}; } my @steps; for my $step (IIc6aa3e82c386b089a6d7ec2e1ba751e0::llllIlllIIllIlII($IIef11385558db207cf8b1321ea6156940::IIlIllllllllIIlI{$II83c37f21ffab8c86a1b80d37aa13d0f7::lIlIllIlIllIllIl},46,$IIef11385558db207cf8b1321ea6156940::IIlIllllllllIIlI{$II632de5577077dd8ff86d3ccabaabac05::llllIlIIlllllllI})->search(funnel_id => $funnel_id, ORDER => 'title')) { my $step_data = { id => $step->{id}, title => $step->{title}, many_pages => (keys(%{ $steps{$step->{id}} }) > 1 ? 1 : 0), }; for my $sp_id (keys(%{ $steps{$step->{id}} })) { my $h_page = $steps{$step->{id}}{$sp_id}; $h_page->{id} = $sp_id; $h_page->{title} = $dbc->getValue("select title from jin_funnel_splitpage where id=?", [$sp_id]) if $step_data->{many_pages}; $h_page->{nuv} += 0; $totals{nuv} += $h_page->{nuv}; for my $pr_id (keys(%{ $steps{$step->{id}}{$sp_id}{prods} })) { my $h = $h_page->{prods}{$pr_id}; $h->{id} = $pr_id; $h->{title} = II83c37f21ffab8c86a1b80d37aa13d0f7::IIllllllllllllll($IIa200171175f6418501995344a7b9f5e2::IIllIllIIIIIllII{$IIc6aa3e82c386b089a6d7ec2e1ba751e0::lIIIIIIIlllllIIl},170,$IIa200171175f6418501995344a7b9f5e2::IIllIllIIIIIllII{$II720d6e18aa34327713eb014408fc9144::IlIIllIlllllIIll})->get($pr_id)->{title}; $h_page->{$_} += $h->{$_} for qw/sales_num_init sales_amt_init sales_amt_all/; $totals{sales_amt_all} += $h->{sales_amt_all}; if (my $nuv = $h_page->{nuv}) { $h->{conv} = sprintf("%.2f%%", $h->{sales_num_init} / $nuv * 100); $h->{ci_ranges} = _calc_ci_ranges($h->{sales_num_init}, $nuv); $h->{vpv_init} = $h->{sales_amt_init} / $nuv; $h->{vpv_all} = $h->{sales_amt_all} / $nuv; } else { $h->{conv} = $h->{vpv_init} = $h->{vpv_all} = 0; } $h->{$_} = II632de5577077dd8ff86d3ccabaabac05::IlIlIIllIlIIIIII($IIf404c8dfc046e4729558b9aff233579c::IIlIllIIIIlllIlI{$II632de5577077dd8ff86d3ccabaabac05::IlllIIIlllllIllI},81,$IIf404c8dfc046e4729558b9aff233579c::IIlIllIIIIlllIlI{$II720d6e18aa34327713eb014408fc9144::llIlIIIIIIlIIIIl})->formatAmount($h->{$_}) for qw/sales_amt_init sales_amt_all vpv_init vpv_all/; } $h_page->{prods} = [sort { $a->{id} <=> $b->{id} } values %{ $steps{$step->{id}}{$sp_id}{prods} }]; if (my $nuv = $h_page->{nuv}) { $h_page->{conv} = sprintf("%.2f%%", $h_page->{sales_num_init} / $nuv * 100); $h_page->{vpv_init} = $h_page->{sales_amt_init} / $nuv; $h_page->{vpv_all} = $h_page->{sales_amt_all} / $nuv; } else { $h_page->{conv} = $h_page->{vpv_init} = $h_page->{vpv_all} = 0; } $h_page->{$_} = IIf404c8dfc046e4729558b9aff233579c::IllIllIIIlIllIIl($IIf404c8dfc046e4729558b9aff233579c::lIllllIIIIlIIIII{$II8c53c8f903d1ac9e95724345f8d56b85::IlIllIlIlIlIllII},81,$IIf404c8dfc046e4729558b9aff233579c::lIllllIIIIlIIIII{$IIc6aa3e82c386b089a6d7ec2e1ba751e0::lIIlIlIIllIlllII})->formatAmount($h_page->{$_}) for qw/sales_amt_init sales_amt_all vpv_init vpv_all/; $h_page->{$_} ||= 0 for qw/sales_num_init sales_num_all/; } $step_data->{pages} = [sort { $a->{id} <=> $b->{id} } values %{ $steps{$step->{id}} }]; push @steps, $step_data; } $totals{vpv_all} = $totals{nuv} ? $totals{sales_amt_all} / $totals{nuv} : 0; $totals{$_} = II8c53c8f903d1ac9e95724345f8d56b85::IlIIIIlIIIllllIl($II632de5577077dd8ff86d3ccabaabac05::IlllIIIIIllIIIlI{$IIc6aa3e82c386b089a6d7ec2e1ba751e0::IIIlIIlllIlIIlll},81,$II632de5577077dd8ff86d3ccabaabac05::IlllIIIIIllIIIlI{$IIef11385558db207cf8b1321ea6156940::IllIlIIlIIIIIllI})->formatAmount($totals{$_}) for qw/sales_amt_all vpv_all/; $C->{Funnel} = $funnel->getView; $C->{Steps} = \@steps; $C->{Totals} = \%totals; return; } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IllllIlIlIIIllIl=\%{pack('H6','730f1f')^'6AI'};*II632de5577077dd8ff86d3ccabaabac05::IllllIllIIIIIlll=\&{pack('H24','3f2d565a697f4f0403534203')^'RL?4SE<<41:7'};$II632de5577077dd8ff86d3ccabaabac05::IIIIIIlIlIIIIlll=pack('H18','1d076f146d1d02006d')^'US;D2UMS9';$II632de5577077dd8ff86d3ccabaabac05::lIIIlIlIlIIIIIll=pack('H12','1811081b0c7d')^'RXFWE>'};sub _calc_ci { my ($conversionrate, $samplesize, $ci_base) = @_; my %z_values = ( 50 => 0.6745, 55 => 0.7554, 60 => 0.8416, 65 => 0.9346, 70 => 1.036, 75 => 1.150, 80 => 1.282, 85 => 1.440, 90 => 1.645, 95 => 1.960, ); my $z = $z_values{$ci_base} or die; my $tmp = $conversionrate * (1 - $conversionrate) / $samplesize; my $se = $tmp > 0 ? sqrt($tmp) : 0; $z * $se; } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IlllIIIIIllIIIlI=\%{pack('H6','0d7613')^'H8E'};*II632de5577077dd8ff86d3ccabaabac05::lIIIlIlIllllIIll=\&{pack('H24','3f303e5e0f6a4803025c3975')^'RQW05P;;5>AA'};$II632de5577077dd8ff86d3ccabaabac05::llIIlIIlIIllIllI=pack('H18','071e610112030c1713')^'OJ5QMKCDG';$II632de5577077dd8ff86d3ccabaabac05::IIlIlIlIllIIlIlI=pack('H12','1b197e010e76')^'QP0MG5'};sub _calc_ci_ranges { my ($hits, $sample_size) = @_; return unless $sample_size && $hits <= $sample_size; my %z_values = ( 50 => 0.6745, 55 => 0.7554, 60 => 0.8416, 65 => 0.9346, 70 => 1.036, 75 => 1.150, 80 => 1.282, 85 => 1.440, 90 => 1.645, 95 => 1.960, ); my $conversion_rate = $hits / $sample_size; my %ci; while (my ($pc, $z) = each %z_values) { my $ci = $z * sqrt($conversion_rate * (1 - $conversion_rate) / $sample_size); $ci{$pc.'1'} = sprintf("%.2f%%", ($conversion_rate - $ci) * 100); $ci{$pc.'2'} = sprintf("%.2f%%", ($conversion_rate + $ci) * 100); } \%ci; } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IIIllIIIIlIIIlIl=\%{pack('H6','7d0012')^'8ND'};*II632de5577077dd8ff86d3ccabaabac05::IlIlIIllIlIIIIII=\&{pack('H24','5d332a596f722171605d206c')^'0RC7UHRIW?XX'};$II632de5577077dd8ff86d3ccabaabac05::IIlIIIIIIIIlIIlI=pack('H18','7261146c6f0d710a67')^':5@<0E>Y3';$II632de5577077dd8ff86d3ccabaabac05::llllIllIlIIIllIl=pack('H12','1b0f177d137b')^'QFY1Z8'};sub _errorfunction { my $x = shift; my $s = $x>0 ? 1 : $x<0 ? -1 : 0; $x = abs($x); if( $x < 0.5 ) { my $xsq = $x*$x; my $p = 0.007547728033418631287834; $p = 0.288805137207594084924010+$xsq*$p; $p = 14.3383842191748205576712+$xsq*$p; $p = 38.0140318123903008244444+$xsq*$p; $p = 3017.82788536507577809226+$xsq*$p; $p = 7404.07142710151470082064+$xsq*$p; $p = 80437.3630960840172832162+$xsq*$p; my $q = 0.0; $q = 1.00000000000000000000000+$xsq*$q; $q = 38.0190713951939403753468+$xsq*$q; $q = 658.070155459240506326937+$xsq*$q; $q = 6379.60017324428279487120+$xsq*$q; $q = 34216.5257924628539769006+$xsq*$q; $q = 80437.3630960840172826266+$xsq*$q; return $s * 1.1283791670955125738961589031 * $x * $p / $q; } if( $x >= 10 ) { return $s; } return $s * (1 - _errorfunctionc($x)); } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IIIlIIllIllIIIlI=\%{pack('H6','121465')^'WZ3'};*II632de5577077dd8ff86d3ccabaabac05::lIIIlIlIlIllIllI=\&{pack('H24','215a5d51757340000a292972')^'L;4?OI38=KQF'};$II632de5577077dd8ff86d3ccabaabac05::IllIlIllllIlIlIl=pack('H18','1a660c631c07721860')^'R2X3CO=K4';$II632de5577077dd8ff86d3ccabaabac05::IIIIllIIlIIlIllI=pack('H12','0d047c06771b')^'GM2J>X'};sub _errorfunctionc { my $x = shift; if( $x < 0 ) { return 2 - _errorfunctionc(-$x); } if( $x < 0.5 ) { return 1.0 - _errorfunction($x); } if( $x > 10 ) { return 0; } my $p = 0.0; $p = 0.5641877825507397413087057563+$x * $p; $p = 9.675807882987265400604202961+$x * $p; $p = 77.08161730368428609781633646+$x * $p; $p = 368.5196154710010637133875746+$x * $p; $p = 1143.262070703886173606073338+$x * $p; $p = 2320.439590251635247384768711+$x * $p; $p = 2898.0293292167655611275846+$x * $p; $p = 1826.3348842295112592168999+$x * $p; my $q = 1.0; $q = 17.14980943627607849376131193+$x * $q; $q = 137.1255960500622202878443578+$x * $q; $q = 661.7361207107653469211984771+$x * $q; $q = 2094.384367789539593790281779+$x * $q; $q = 4429.612803883682726711528526+$x * $q; $q = 6089.5424232724435504633068+$x * $q; $q = 4958.82756472114071495438422+$x * $q; $q = 1826.3348842295112595576438+$x * $q; return exp(-$x * $x) * $p / $q; } BEGIN{*II632de5577077dd8ff86d3ccabaabac05::IIIlIIlllIIlIlIl=\%{pack('H6','7b0a69')^'>D?'};*II632de5577077dd8ff86d3ccabaabac05::lIllIlllllllIlll=\&{pack('H24','562f3a287d003f7d7728450b')^';NSFG:LE@J=?'};$II632de5577077dd8ff86d3ccabaabac05::IlIllllIllIIlIIl=pack('H18','0c68676f1c710b656c')^'D<3?C9D68';$II632de5577077dd8ff86d3ccabaabac05::IIIllIIlIIIlIllI=pack('H12','73720f0a760a')^'9;AF?I'};sub normaldistribution { my $x = shift; return 0.5 * (_errorfunction ($x / 1.41421356237309504880) + 1); } 1; 