avoid rounding errors in javascript with bigdecimal?
This is not a rounding problem.  The 3.6 EUR is correctly rounded to two decimals from 3.597568 EUR.  

Computers don't know when we want to see trailing zeros.  The problem is formatting:

console.log(eur_b.setScale(2,mode).longValue().toFixed(2));

output: 3.60


(fiddle)