#4867 closed defect (fixed)
[NF] Evaluate scalar product and power operator
| Reported by: | Francesco Casella | Owned by: | Martin Sjölund |
|---|---|---|---|
| Priority: | high | Milestone: | 2.0.0 |
| Component: | New Instantiation | Version: | |
| Keywords: | Cc: |
Description
Please check Modelica.Blocks.Examples.NoiseExamples.DrydenContinuousTurbulence. The following error is reported:
[OMCompiler/Compiler/NFFrontEnd/NFCeval.mo:1115:20-1115:79:writable]
Error: Internal error NFCeval.evalBuiltinSqrt got invalid arguments
({182.88 ^ 2.0 / 72.01599999999999 ^ 2.0, 5.078871361919574, 1.0} *
({182.88 ^ 2.0 / 72.01599999999999 ^ 2.0, 5.078871361919574, 1.0}))
as far as I understand, the expression between parentheses is a scalar product, so it should result in a scalar output, which should be a legitimate argument for the sqrt() function.
Change History (9)
comment:1 by , 8 years ago
| Component: | *unknown* → New Instantiation |
|---|---|
| Milestone: | Future → 2.0.0 |
| Owner: | changed from to |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:4 by , 8 years ago
| Milestone: | 2.0.0 → 1.13.0 |
|---|---|
| Summary: | NFCeval.evalBuiltinSqrt does not handle a scalar product argument → [NF] Evaluate scalar product and power operator |
comment:6 by , 8 years ago
| Milestone: | 1.13.0 → 2.0.0 |
|---|
So far, all the tickets involving the NF were closed with milestone 2.0.0, meaning that the change will be effecive with 2.0.0, when the NF will become the default one.
It is true that you can get the feature with 1.13.0 and -d=newInst, but that is meant as an experimental feature, not as a released feature.
Is that ok?
follow-up: 9 comment:7 by , 8 years ago
I suppose, but that makes it harder to figure out when something was actually added to the compiler.
comment:8 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:9 by , 8 years ago
Replying to sjoelund.se:
I suppose, but that makes it harder to figure out when something was actually added to the compiler.
For that, we have a nice link to the PR :)

The main issue here is that evalBuiltinSqrt only works if it is sent a Real literal; if any of the subexpressions fail to evaluate, it will print this message (even if it is the exponentiation that fails, if I guess correctly).