Login Page - Create Account

Support Board


Date/Time: Thu, 16 Jan 2025 03:15:00 +0000



Post From: Sierra adding extra digits to double in arrays

[2017-09-30 19:52:18]
michelh - Posts: 159
Hi Sierra,

My developer is translating some code from meta trader to sierra.

We are having some issues with double elements of arrays.

When we input doubles into the array with say 5 decimal places, debugging showed that Sierra is adding extra digits up to the 16 decimal places in the variable.
Over many iterations in the loop, this is introducing errors such that the output is different from the meta-trader code used for the conversion.

This is occurring despite proper variable initialization.

Is there a solution to this?

I looked in the ASCIL and found information on the sc.valueformat but I understand this to be related to how a subgraph is displayed and NOT pertaining to subgraph arrays used for calculation.

Can you please help?
Date Time Of Last Edit: 2017-09-30 19:59:58