+1 888 340 6572 GET STARTED
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
Open Bug report MC-2872

function bug IntPortion & Floor

action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

run in R14 Build 24673

once cleardebug;
if date=lastcalcdate and t=lastcalctime then begin
value1=1042.37000;
print(value1:10:5);
Vars: V_power(0);
V_power = power(10,2);
value1= value1 * V_power;
print("value1"," ",value1:10:5);
value2=IntPortion(value1);
print("value2"," ",value2:10:5);
value3=Floor(value1);
print("value3"," ",value3:10:5);
value4=IntPortion(104237.00000);
print("value4"," ",value4:10:5);
value5=Floor(104237.00000);
print("value5"," ",value5:10:5);
value6=IntPortion(1042.3700000 * 10000);
print("value6"," ",value6:10:5);
value7=Floor(1042.3700000 * 10000);
print("value7"," ",value7:10:5);
end;

output: (R14 Build 24673)
1042.37000
value1 104237.00000
value2 104236.00000
value3 104236.00000
value4 104237.00000
value5 104237.00000
value6 10423699.00000
value7 10423699.00000

the same code run in (R14 Build 23013)
Output:
1042.37000
value1 104237.00000
value2 104237.00000
value3 104236.00000
value4 104237.00000
value5 104237.00000
value6 10423700.00000
value7 10423699.00000

In version R14 Build 24673, the result of taking the function (IntPortion&Floor) after multiplying a value by a value will be incorrect.
In version R14 Build 23013, the result of taking the function (Floor) after multiplying a value by a value will be incorrect.

Steps to reproduce this issue
Nothing entered.
Comments (1)
#1
user-offline.png  MultiCharts Support (MultiCharts)
Jun 29, 2023 - 12:04
Hello! That’s expected behavior for calculations including values with digits following the decimal point. These decimals occur when it’s impossible to display a byte with an endless number precision with a floating point as a fixed number. It’ll be required to round the values to get rid of decimals.

History
Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    Not determined
  • Status
    Not a bug
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates