Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-03

Floor, Ceil and Int64

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Hi,

Floor and Ceil (math unit) only return integers.
Should there be an overloaded one for Int64 as well?

B = 11111111111.111100000000000
Trunc(B) = 11111111111 [00000002964619C7]
Frac(B) = 0.111110687255859
Floor(B) = -1773790777 [FFFFFFFF964619C7] //expected: 11111111111

Bart

Peter
to Bart
Bart wrote 15 lines
Hi, Floor and Ceil (math unit) only return integers. Should there be an overloaded one for Int64 as well? B = 11111111111.111100000000000 Trunc(B) = 11111111111 [00000002964619C7] Frac(B) = 0.111110687255859 Floor(B) = -1773790777 [FFFFFFFF964619C7] //expected: 11111111111 Bart _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Hi Bart,

Agree it would be nice to have a wider range for Floor & Ceil. I would suggest raising a bug report for this.
Its not been fixed in trunk (as of this post).

Regards,
Peter