Sin, Cos, Sinh, and CoshΒΆ
Sin, cos, sinh, and cosh on PowerVR architecture have a reasonably low cost of four cycles.
This is broken down as:
Two cycles of reduction
sinc
One conditional.
fragColor.x = sin(t.x); // four cycles
{fred}
{fred}
{fsinc}
{fmul, mov} // plus conditional
// Intructions on Volcanic:
{sinf}
fragColor.x = cos(t.x); // four cycles
{fred}
{fred}
{fsinc}
{fmul, mov} // plus conditional
// Intructions on Volcanic:
{cosf}
fragColor.x = cosh(t.x); // three cycles
{fmul, fmul, mov, mov}
{fexp}
{sop, sop}
// Intructions on Volcanic:
{mul}
{exp2}
{exp2}
{add}
{mul}
fragColor.x = sinh(t.x); // three cycles
{fmul, fmul, mov, mov}
{fexp}
{sop, sop}
// Intructions on Volcanic:
{mul}
{exp2}
{exp2}
{add}
{mul}