This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libmvec in gcc to have vector math in fortran


On Fri, Jun 15, 2018 at 10:39 AM Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>
> On 15/06/18 08:59, Florian Weimer wrote:
> > * Richard Biener:
> >
> >> 'pure' makes it pure but there doesn't seem to be a way to make it const?
> >
> > Does Fortran support setting the rounding mode?
> >
>
> yes, but vec math is only enabled with -ffast-math (so it can
> assume -fno-rounding-math)
>
> > In C, sin is not const because it depends on the current rounding
> > mode.
> >
>
> hm i don't see const in glibc even in case of -ffast-math compilation,
> i wonder if that can be changed.

For sin() it also depends on -fno-math-errno (default for fortran) given
sin() may set errno according to the manpage (that means it isn't
even pure by default).

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]