what do you recommend for expressions in statements concerning e.g. performmace. Examples:
a = 1/2 * sin(2/3 * x) or better 1.0/2.0 * sin(2.0/3.0) or even 1//2 * sin(2//3 * x)
BTW: I don’t want to write 0.5 * sin (0.6666666 * x) or something like that in order to make them similar to the mathematical formula. I would prefer the first variant.
From my Fortran history I was used to avoid internal conversions, e.g. if result (variable a) was double precision (aka Float64) then it was written like 1.d0/2.d0 + sin(…) and not 1/2 * sin(…).
Any recommendations, any performance differences (of course not for a single statement, but if you have thousands of such terms it may matter)? I like to find a final (own) “style” for the re-implementation of some projects in Julia (from Fortran).