https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93871
--- Comment #38 from Thomas Henlich <thenlich at gcc dot gnu.org> --- (In reply to Thomas Henlich from comment #37) > It would make sense to keep optimization in mind: > > Several calls to conversions of the same value should be performed only once. > > As a special case: Calls to compute sind(x) and cosd(x) should be optimized > to a conversion, followed by a call to sincos. > > The conversion could also be provided as a user function, for example in > code like y=tand(x)-deg2rad(x) the conversion would need to be performed > only once. I just realized this is probably a lot harder than it sounds, since it is incompatible with some of the range reduction steps, or at the least requires some further folding into x <= 45 for sincos to get sufficient accuracy. On the other hand side, always folding sind(45...90) to cosd(45...0) and cosd(45...90) to sind(45...0) probably wouldn't be such a bad thing.