Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V7028. User-defined mathematical...
menu mobile close menu
Additional information
toggle menu Contents

V7028. User-defined mathematical constant is used instead of a built-in constant. The resulting value may be inaccurate.

Jun 16 2026

The analyzer has detected that the constants used for mathematical calculations lack sufficient precision.

The example:

function calculateCircumference(radius) {
  const diameter = 2 * radius;
  return diameter * 3.1415;
}

This record is not entirely correct, as it may lead to imprecise calculation results. When working with mathematical constants, it is recommended to use the properties and methods of the Math object.

The fixed example:

function calculateCircumference(radius) {
  const diameter = 2 * radius;
  return diameter * Math.PI;
}