#!/usr/bin/perl -w

use strict;

for (my $x = 0; $x <= 1.01; $x += 0.05) {
    my $exp = exp(-$x);
    my $lin = 1 - $x;
    my $err = 100*($exp - $lin)/$exp;
    my $e2  = $x == 0 ? 0 : -100*(1-$exp - $x)/(1-$exp);
    printf "%4.2f & %4.2f & %4.2f & %5.2f & %5.2f \\\\\n", $x, $exp, $lin, $err, $e2;
}
