What should be the output of ceiling?
Posted in 1999
Topics: General Discussion
What should be the output of ceiling? Here is some comparison on Informix(7.30 UC3)/Oracle/SQLServer Select stmt used 'SELECT CEILING (ip_value) .' Database ip_value op_value ----------- -------- ------------ Informix 10 11 Oracle 10 10 SQLServer 10 10 Informix 10.0 11 Orac 10.0 10 SQLServer 10.0 10 Informix 10.1 11 Oracle 10.1 11 SQLServer 10.1 11 For last set i.e. when ip_value is 10.1 o/p is same for all the databases, then why is the first two result sets different in Informix, is this Bug in Informix or is it the correct o/p of ceiling? Girish Kagrana
Girish Kagrana wrote: > > What should be the output of ceiling? > > Here is some comparison on Informix(7.30 UC3)/Oracle/SQLServer > > Select stmt used 'SELECT CEILING (ip_value) .' > > Database ip_value op_value > ----------- -------- ------------ > Informix 10 11 > Oracle 10 10 > SQLServer 10 10 > > Informix 10.0 11 > Orac 10.0 10 > SQLServer 10.0 10 > > Informix 10.1 11 > Oracle 10.1 11 > SQLServer 10.1 11 > > For last set i.e. when ip_value is 10.1 o/p is same for all the databases, > then why is the first two result sets different in Informix, is this Bug > in Informix or is it the correct o/p of ceiling? Looks like you have a bug report Girish. Ceiling is supposed to parallel the "C" ceil and ceilf functions which are defined to return "the smallest integer not smaller than" their argument. Art S. Kagel