#! /usr/bin/perl

use List::Util qw(sum0);
use C4::Context;


my $total = sum0( .15,.15,.15);
print sprintf("%.20f",$total);
print "\n";

my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("SELECT SUM(a) AS total FROM (SELECT .15 AS a UNION ALL SELECT .15 AS a UNION ALL SELECT .15 AS A) foo;");
$sth->execute();
$total = $sth->fetchrow_hashref();
print sprintf("%.20f",$total->{total})+0;
print "\n";

