diff --git a/src/section/section_type.ts b/src/section/section_type.ts index e037d6a68051ee1cae446050afe23f0db469e06a..d71bdc7b43dc47ef6e0049aabf041a7e13e8105b 100644 --- a/src/section/section_type.ts +++ b/src/section/section_type.ts @@ -27,7 +27,7 @@ export abstract class cParamsCanal implements IParamsEquation { this._Q = new ParamDefinition(nodeType, 'Q', ParamDomainValue.POS_NULL, rQ); this._If = new ParamDefinition(nodeType, 'If', ParamDomainValue.ANY, rIf); this._Prec = new ParamDefinition(nodeType, 'Prec', ParamDomainValue.POS, rPrec); - this._iPrec = new ParamDefinition(nodeType, 'iPrec', ParamDomainValue.ANY, -Math.log(rPrec) / Math.log(10)); + this._iPrec = new ParamDefinition(nodeType, 'iPrec', ParamDomainValue.ANY, Math.round(-Math.log(rPrec) / Math.log(10))); this._YB = new ParamDefinition(nodeType, 'YB', ParamDomainValue.POS, rYB); this._YCL = new ParamDefinition(nodeType, 'YCL', ParamDomainValue.POS_NULL, rYCL); this._Dx = new ParamDefinition(nodeType, 'Dx', ParamDomainValue.NOT_NULL, rDx);