errato arrotondamento

Moderator: Enrico Maria Giordano

errato arrotondamento

Postby Silvio.Falconi » Wed Nov 16, 2022 12:38 pm

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

Code: Select all  Expand view
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 November 2023 - January 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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: errato arrotondamento

Postby Silvio.Falconi » Wed Nov 16, 2022 12:43 pm

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 November 2023 - January 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: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to All products support

Who is online

Users browsing this forum: No registered users and 4 guests