Float int multiplication | developer.brewmp.com Float int multiplication | developer.brewmp.com

Developer

Float int multiplication

Forums:

Hello freinds,

I need to multiply a float value to a integer value to again get a float value ..
How do i do that??

for eg--
Rs 10.25/- into 3 will give me result Rs 30.75 /-

Is it possible?HOW?
any code snippet availble?

You can make use of below helper functions of Brew to cater your needs:
double FMUL(double v1, double v2)
double FDIV(double v1, double v2)
double FADD(double v1, double v2)
double FSUB(double v1, double v2)

You can make use of below helper functions of Brew to cater your needs:
double FMUL(double v1, double v2)
double FDIV(double v1, double v2)
double FADD(double v1, double v2)
double FSUB(double v1, double v2)

Keep in mind that most languages and most hardware does not support this operation directly. When you attempt to do any float/int math, the int is converted to a float first, then the operation is performed with float/float math.

Keep in mind that most languages and most hardware does not support this operation directly. When you attempt to do any float/int math, the int is converted to a float first, then the operation is performed with float/float math.

rabidcow wrote:Keep in mind that most languages and most hardware does not support this operation directly. When you attempt to do any float/int math, the int is converted to a float first, then the operation is performed with float/float math.
Yes, its quite obvious, also in accordance with the API signatures as well.

rabidcow wrote:Keep in mind that most languages and most hardware does not support this operation directly. When you attempt to do any float/int math, the int is converted to a float first, then the operation is performed with float/float math.
Yes, its quite obvious, also in accordance with the API signatures as well.