# NE for fp auction 
# b(x) = x - int F^(n-1) / F^(n-1)
#
# important point is to not evaluate b() symbolically,
# but integrate F for each data point
#
fd1 := fopen("data1", WRITE);
Digits := 20;
#
assume(v>=0);
assume(n, integer);
assume(i, integer);
additionally(n>1);
#
# slope down: f(x) = (2/M)*(1 - x/M)
#
M := 100.0; 
n := 15;
#
f := x -> (2/M)*(1-x/M);
F := x -> int(f(t), t=0..x);
simplify(F(v));
#check
evalf(F(0));
evalf(F(M));
#
for i from 1 to 100 do
x := evalf(M*(0.01*i));
y := x - int(F(t)^(n-1), t=0..x)/F(x)^(n-1);
fprintf(fd1, "%g %g\n", x, y);
od;
quit;