▁when ▁round ing ▁to ▁integer ▁using ▁round ing ▁half ▁to ▁even , ▁but ▁would ▁give ▁ 9 ▁when ▁rounded ▁to ▁integer ▁directly . ▁B orm an ▁and ▁Ch at field ▁discuss ▁the ▁imp lications ▁of ▁double ▁round ing ▁when ▁comparing ▁data ▁rounded ▁to ▁one ▁decimal ▁place ▁to ▁specification ▁limits ▁expressed ▁using ▁integers . ▁ ▁In ▁Mart ine z ▁v . ▁All state ▁and ▁S ende jo ▁v . ▁Farm ers , ▁lit ig ated ▁between ▁ 1 9 9 5 ▁and ▁ 1 9 9 7 , ▁the ▁ins urance ▁companies ▁argued ▁that ▁double ▁round ing ▁prem iums ▁was ▁perm iss ible ▁and ▁in ▁fact ▁required . ▁The ▁US ▁courts ▁ruled ▁against ▁the ▁ins urance ▁companies ▁and ▁ordered ▁them ▁to ▁adopt ▁rules ▁to ▁ensure ▁single ▁round ing . ▁ ▁Some ▁computer ▁languages ▁and ▁the ▁IE EE ▁ 7 5 4 - 2 0 0 8 ▁standard ▁dict ate ▁that ▁in ▁straightforward ▁calculations ▁the ▁result ▁should ▁not ▁be ▁rounded ▁twice . ▁This ▁has ▁been ▁a ▁particular ▁problem ▁with ▁Java ▁as ▁it ▁is ▁designed ▁to ▁be ▁run ▁ident ically ▁on ▁different ▁machines , ▁special ▁programming ▁tr icks ▁have ▁had ▁to ▁be ▁used ▁to ▁achieve ▁this ▁with ▁x 8 7 ▁floating ▁point . ▁The ▁Java ▁language ▁was ▁changed ▁to ▁allow ▁different ▁results ▁where ▁the ▁difference ▁does ▁not ▁matter ▁and ▁require ▁a ▁strict fp ▁qual ifier ▁to ▁be ▁used ▁when ▁the ▁results ▁have ▁to ▁conform ▁accur ately . ▁ ▁In ▁some ▁algorithms , ▁an ▁intermediate ▁result ▁is ▁computed ▁in ▁a ▁larger ▁precision , ▁then ▁must ▁be ▁rounded