Decimal places

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobC
    New User
    • Jun 2010
    • 0

    Decimal places

    I use BC to compare xml files which include calculated numbers

    Is there a way to flag as unimportant where two numbers only differ after n decimal places ie if n = 3 then

    <Numb>123.45678</Numb> and <123.45681</Numb> would be flagged as unimportant
    <Numb>123.45678</Numb> and <Numb>123.46578</Numb> would be flagged as important

    Any ideas gratefully received
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Beyond Compare doesn't support numerical tolerances in the text compare.

    You can define part of the text as unimportant to ignore the differences. You could define a grammar that matches on 3 decimal characters followed by </Numb>, then mark it as unimportant. Instructions to mark text unimportant in BC3 is available at the following link: http://www.scootersoftware.com/suppo..._unimportantv3
    Chris K Scooter Software

    Comment

    Working...