IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  PubmathmultiplyFloats

    Posted 03/05/04 09:12 PM

    Hi,

    Seems like there is a bug for pub.math:multiplyFloats service. If you pass num1 value as 39.38 and num2 value as 100, output will be 3938.0000000000005.There are few more values like this.

    Thanks,

    Pauly


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: PubmathmultiplyFloats

    Posted 03/05/04 10:54 PM

    Hi,

    Its not a bug. I would have to round the value for 2 decimals to get my desired value.

    Thanks,

    Pauly


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: PubmathmultiplyFloats

    Posted 03/08/04 02:30 PM

    This is an old wM issue, because it treats the numbers as double rather than float. Even pub.math:addFloats also gives incorrect results for certain values. Try adding 104.42 + 21.10 addFloats will give you 125.52000000000001

    Rounding may work sometime, but not always.

    You may write your own java service and convert the numbers to float or BigDecimal to do math.

    Kazi


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: PubmathmultiplyFloats

    Posted 03/09/04 05:52 AM

    Hi,

    There is an article on problems with using floats and doubles written by Rob Eamon.

    [url=“wmusers.com”]wmusers.com

    HTH

    Vikram


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB