# Gnuplot script # plot relative timings for 80-bit/32-bit/64-bit reset set macros #set term png enhanced font arial 10 size 400,600 set term png enhanced size 700,500 set xlabel "N" set key right top Left reverse set xrange [5. : 2**36] set yrange [1e-18:1e-3] set logscale x set logscale y #set grid dir="./data/" #dir="./" do for [h in "cluster cluster42"] { #print sprintf("cd %s; paste 32_%s_sum.o2.1 64_%s_sum.o2.1 80_%s_sum.o2.1 > %s.tmp",dir,h,h,h,h) system( sprintf("cd %s; paste 32_%s_pi.o2.1 64_%s_pi.o2.1 80_%s_pi.o2.1 > %s.tmp",dir,h,h,h,h) ) } # reset index of default line styles colors="black blue green dark-violet red yellow brown" set for [i=1:words(colors)] linetype i lw 2 lc rgb word(colors, i) sc=1e9 ref= sc*3.14159265358979323846264 set title sprintf("Relative accuracy of PI") set output sprintf('acc_pi.png') h="cluster42"; dat=dir.h.".tmp" plot dat using 2:($2 <= 2**19 ? abs($4*sc-ref)/ref : 1/0) title "32-bit" with lp,\ dat using 2:(abs($11*sc-ref)/ref) title "64-bit" with lp,\ dat using 2:(abs($18*sc-ref)/ref) title "80-bit" with lp