28.10.2006, 16:40 | #1 |
Участник
|
Dynamics AX Geek: Axapta & precision
Источник: http://AxGeek.spaces.live.com/Blog/c...DB13!143.entry
============== <div><div>Brandon reported his frustration about un-Real precision yesterday. And he has a point of course. However, I think the real issue here is not how many digits there are after the decimal sign, it is how many decimals there are overall. Axapta handles a precision of up to 16 digits. This can become an issue when dealing with very large numbers and high precision at the same time (inventory closing for example). The job below illustrates the point. It job takes two numbers a and b, adds them up and prints the results. For each inner loop another digit is appended to the end. The first outer iteration takes a starting value of 9, the next 99 and the final iteration starts at 999. The point is that the calculation will “bum out” at step 15 for starting value 9, at step 14 for 99 and at 13. for 999. In other words it fails as soon as the total number of digits reaches 16. static void realPrecision(Args _args) { int i,j; real a,b; ============== Источник: http://AxGeek.spaces.live.com/Blog/c...DB13!143.entry |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|