Is there a floating-point division function/operator?
Started by Jean-Christian Imbeaultabout 23 years ago2 messagesgeneral
In Postgresql the "/" operator does integer division. Is there an
operator or function that will do floating-point division?
I looked through the iDocs but there was no mention of such a function.
Thanks,
Jc
Re: Is there a floating-point division function/operator?
On Thu, 23 Jan 2003, Jean-Christian Imbeault wrote:
In Postgresql the "/" operator does integer division. Is there an
operator or function that will do floating-point division?
/ does division based on the types of its operands
1/2 -> 0
1::float / 2 -> 0.5