Glossary entry

French term or phrase:

la valeur (est) tronquée pour supporter la représentation dans le type primitif

English translation:

value is truncated to conform to the primitive type representattion

Added to glossary by veratek
Nov 3, 2010 07:18
13 yrs ago
2 viewers *
French term

la valeur tronquée pour supporter la représentation dans le type primitif

French to English Tech/Engineering IT (Information Technology) JAVA
Utiliser les constructeurs BigDecimal et BigInteger à base de chaînes de caractères.

Lorsqu’on crée un BigDecimal (resp. BigInteger) à partir d’une constante du type primitif double (resp.integer), la valeur tronquée pour supporter la représentation dans le type primitif :

//EVITER
BigDecimal num = new BigDecimal(8250325.12f);
//PREFERER
BigDecimal num = new BigDecimal(“8250325.12”);

Discussion

mimi 254 Nov 3, 2010:
est? la valeur est tronquée...?
veratek (asker) Nov 3, 2010:
isn't there a verb missing in this sentence:

Lorsqu’on crée un BigDecimal (resp. BigInteger) à partir d’une constante du type primitif double (resp.integer), la valeur tronquée pour supporter la représentation dans le type primitif

Proposed translations

+1
1 hr
Selected

value is truncated to conform to the primitive type representattion

I believe the value is rounded actually, not truncated but it is a possibility.

What they mean is that when you use the first form (eviter) the value you enter is first converted to double type and only then to the BigDecimal. Because not all decimal fractions can be exactly represented as binary, some rounding will be needed. This causes loss of precision.

If you use the second form (preferer), the value is converted directly into decimal with no loss.
Peer comment(s):

agree lydiar
19 hrs
Thank you
Something went wrong...
4 KudoZ points awarded for this answer. Comment: "Thanks."
Term search
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search