I’ve tried to calculate radiance rgb values from the XYZ values (CIE-XYZ) with xyz_rgb.cal, but the result that I got seems wrong. The exact command I used was:
The Jaloxa colour picker uses the Radiance xyz_rgb.cal set of formulas, and should give the same result as running rcalc -f xyz_rgb.cal. It uses these primaries (again, from Radiance):
var CIE_pri = new Array(0.640,0.330, 0.290,0.600, 0.150,0.060, 0.33333,0.33333);
I noticed a typo in your -e expression. It should be “$1=…;$2=…;$3=…”. You are defining $1 three times.
It might also be a good idea to use physically possible XYZ. (1,0,0) is outside the CIE 1932 horseshoe diagram. I wonder whether this causes some unexpected behaviour. Try this, which gives the same result in the colour picker where you would use (30, 40, 50):