#!/usr/local/bin/perl -w --

$OFF = 0.001;

$last = undef();
while(<>)	{
	if(m'^#Accept' && m'di=(\d+).*?([0-9eE+.-]+)//')	{
		my $var=$2;
		my $i = $1;
		if(defined($last))	{
			print "$i " . log($var/$last)*($var+$last)/($OFF+$var+$last) . " $var $last\n";
			}
		$last = $var;
		}
	}
