From: Ralf S. <ral...@gm...> - 2014-12-30 15:56:42
|
Hi, I've come across something weird. Look at the following code which I've taken from one of the examples on the GLE website: size 11 8 sub entropy x return (-x)*log(x)/log(2)-(1-x)*log(1-x)/log(2) end sub set texlabels 1 begin graph scale auto title "$E(D) = -p_\oplus \cdot \log_2 p_\oplus - (1-p_\oplus) \cdot \log_2 (1-p_\oplus)$" xtitle "$p_\oplus$" ytitle "Entropy $E(D)$" xaxis min -0.1 max 1.1 let d1 = entropy(x) from 0 to 1 d1 line color red end graph Now try this modified version which should give the same results, but doesn't: size 11 8 sub entropy x return (-x)*log(x)/log(2)-(1-x)*log(1-x)/log(2) end sub set texlabels 1 begin graph scale auto title "$E(D) = -p_\oplus \cdot \log_2 p_\oplus - (1-p_\oplus) \cdot \log_2 (1-p_\oplus)$" xtitle "$p_\oplus$" ytitle "Entropy $E(D)$" xaxis min -0.1 max 1.1 let d1 = entropy(x) from 0 to 1 let d2 = d1 !!! new !!! d2 line color red !!! changed !!! end graph On my system the second version seems to be missing the start of the line in the graph. Shouldn't let d2=d1 give a 1-to-1 copy of d1 in d2? I'm using version gle-graphics-4.2.4c-exe-win32. Regards Ralf |