Question: The plot of a function goes wrong

Hi

A function ta(x) is defined

Testing it indicates  that everything seems ok.

ta(2010);                 0.2212273448

ta(2050);               4.440420849

But printing goes totally wrong :

plot(ta(x), x = 2000 .. 2030);

The code consists of 13 constants and 4 equations.

Am I overlooking something?  Any idea?

 

na := 8.069439677916595*10^5;
nb := -1.777065899098942*10^3;
nc := 1.467451715287991;
nd := -5.383733471268420*10^(-4);
ne := 7.404613067985871*10^(-8);
am := 0.77317633747818500000;
bm := -0.00626025741156560000;
cm := 0.00002185947833342660;
ap := 471.909671218139000000000000;
bp := -7.368938071612570000000000;
cp := 0.041111235018593800000000;
dp := -0.000098963929768727000000;
ep := 0.88147417256725300*10^(-7);

c_y := y -> na + nb*y + nc*y^2 + nd*y^3 + ne*y^4;
to_c := ppm -> ap + bp*ppm + cp*ppm^2 + dp*ppm^3 + ep*ppm^4;
to_y := y -> tpn(c_y(y));
ta := x -> 0.0014*int(to_y(y), y = 2000 .. x);

 

 

Please Wait...