[Bug c/97689] (ceilf(begin/(float)tstep))*tstep

2020-11-03 Thread jkaltes at hotmail dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97689

--- Comment #1 from Jaap Korthals Altes  ---
Created attachment 49491
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49491&action=edit
gcc -v

[Bug c/97689] New: (ceilf(begin/(float)tstep))*tstep

2020-11-03 Thread jkaltes at hotmail dot nl via Gcc-bugs
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 
#include 


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