errato arrotondamento

Moderator: Enrico Maria Giordano

Post Reply
User avatar
Silvio.Falconi
Posts: 7232
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

errato arrotondamento

Post by Silvio.Falconi »

non riesco a calcolare l'esatto arrotondamento
sul forun ho trovato questa funzione

Code: Select all | Expand

Function RoundUp(nNumb,nDecimals)
Return int(nNumb*10^nDecimals+.9)/10^nDecimals
 
ma i prezzi con due decimali ( euro) a volte sono inferiori di 0.01 e a volte superiori di 0.01 come posso risolvere ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
Posts: 7232
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: errato arrotondamento

Post by Silvio.Falconi »

adesso ho corretto con .6 anzichè .9 e pare che vada ok ma non l'ho capita
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply