Siebel Open UI, Tools, Scripting and EAI (MOSC)

MOSC Banner

Precision Loss due to multiplication issue in siebel escripting

edited Jul 14, 2016 8:34AM in Siebel Open UI, Tools, Scripting and EAI (MOSC) 4 commentsAnswered

In BC PrewriteRecord event, there is a code like

var n = a*b;

Consider,

a = 0.1, b = 3,  then n=a*b is getting calculated as 0.30000000000000004  instead of 0.3. Please explain how it is getting calculating like this.


Even in siebel bookshelf itself, there is an example

var n = 34.855;
n = n* 100;
var r = Math.round(n)

The value of n is 3485.499999999999995 instead of 3485.5.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center