I need to use Pi, with as much precision as possible, in data transformation commands in SPSS. How can I do this without entering the known value (approximately 3.14) manually?
Resolving The Problem
You can use the fact that tan(Pi/4) = 1 with the ARTAN (inverse tan) function that is available in SPSS. SPSS returns a value equal to Pi/4 in (double precision) for the expression ARTAN(1). So you may simply use the expression
as the expression of Pi in your transformation commands. If you are using Pi for 2 or more times in a set of transformations, it would be efficient to first create a variable that is equal to Pi and which you could delete before saving the data file.
COMPUTE PI = 4*ARTAN(1).
16 April 2020