Without actually building a system that does this, I would GUESS that there's no difference at all. And sin
tends to take quite some time anyway, so it's likely that any minor optimisation made on the use of local variables, etc is very marginal.
I'd expect that most "good" compilers (gcc, Microsoft, etc) would optimise out any local variable that isn't extensively used, and produce exactly the same code.
But like I said, without actually trying both methods, it's hard so say for sure [And I'd remove the call to sin
too, since that's likely to "hide" any minor differences between the two variants - just adding the 6 double values would be a better solution].
If performance (in this function in particular) is of essence then produce a benchmark. But also, before you start "messing" with functions, make sure you know what functions consume most of the time in your code. It's not much point in shaving two clockcycles off a function that runs a few dozen times, when the whole execution time is several hours (so many billions of cycles).