|
#
# Show the need for a separate upper incomplete gamma function Q(a,x)
# when the region of interest is such that P(a,x), the lower incomplete
# gamma function, approaches 1 and thus provides insufficient precision.
# By definition P(a,x) + Q(a,x) = 1.0
# gnuplot provides P(a,x) as igamma
# Q(a,x) as uigamma
#
unset key
set title offset 0, -7.5
set pointsize 0.5
set grid x
set multiplot layout 2,1 upwards margins 0.25, 0.95, 0.1, 0.95 spacing 0, screen .10
set xrange [83. : 89.]
set yrange [1. - 2.e-15 : 1.0]
set format y "%.16f"
set title "Lower incomplete gamma function: igamma(23, x)\n(low precision in this range)"
plot igamma(23., x) with points notitle
set format y " %h"
set auto y
set yrange reverse
set title "Upper incomplete gamma function: uigamma(23,x)"
plot uigamma(23., x) with points notitle
unset multiplot
Click here for minimal script to generate this plot
|