https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97689

            Bug ID: 97689
           Summary: (ceilf(begin/(float)tstep))*tstep
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jkaltes at hotmail dot nl
  Target Milestone: ---

Created attachment 49490
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49490&action=edit
.i file

#include <stdio.h>
#include <math.h>


int main() {
unsigned int begin=1604288179,tstep=3600;
unsigned int first=(ceilf(begin/(float)tstep))*tstep;
unsigned int first2=((unsigned int)ceilf(begin/(float)tstep))*tstep;
printf("%d %d\n",first,first2);

}
./a.out
gives:
1604289536 1604289600

Reply via email to