1 страниц (6 вхождений)
Numerics or unit operation bug? - Wrong calculation with units - Сообщения
#1 Опубликовано: 27.09.2016 19:58:16
Hi
I always thank you for your efforts to improve the SMath.
I think that I found a bug of SMath calculation.
Please, check it.
Thank you!

Bug report.sm (9 КиБ) скачан 36 раз(а).
I always thank you for your efforts to improve the SMath.
I think that I found a bug of SMath calculation.
Please, check it.
Thank you!
Bug report.sm (9 КиБ) скачан 36 раз(а).
#2 Опубликовано: 28.09.2016 04:34:35
Seems you defined Rf as 1/Utest (definition in a placeholder)
![2016-09-28 09_35_56-SMath Studio Desktop - [Bug%20report.sm].png](/ru-RU/file/rxvzMn/2016-09-28-09_35_56-SMath-Studio-Desktop---_Bug_20report_sm__png)
![2016-09-28 09_37_48-SMath Studio Desktop - [Bug%20report.sm].png](/ru-RU/file/Vhkaux/2016-09-28-09_37_48-SMath-Studio-Desktop---_Bug_20report_sm__png)
In latest RC if you try to edit the formula (f.e. removing the unit from the result), the auto correction applies the parenthesis showing the error
![2016-09-28 09_29_41-SMath Studio Desktop - [Bug%20report.sm_].png](/ru-RU/file/6DCZnE/2016-09-28-09_29_41-SMath-Studio-Desktop---_Bug_20report_sm___png)
Copy the "local" RHS 1/Utest -> remove Rf:1/Utest -> Paste 1/Utst in the placeholder -> cut the new LHS -> Type RF: in the placeholder -> paste the LHS previusly cutted
![2016-09-28 09_48_47-SMath Studio Desktop - [Bug%20report.sm_].png](/ru-RU/file/3KRED2/2016-09-28-09_48_47-SMath-Studio-Desktop---_Bug_20report_sm___png)
In latest RC if you try to edit the formula (f.e. removing the unit from the result), the auto correction applies the parenthesis showing the error
Copy the "local" RHS 1/Utest -> remove Rf:1/Utest -> Paste 1/Utst in the placeholder -> cut the new LHS -> Type RF: in the placeholder -> paste the LHS previusly cutted
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
3 пользователям понравился этот пост
#3 Опубликовано: 28.09.2016 05:23:11
WroteHi
I always thank you for your efforts to improve the SMath.
I think that I found a bug of SMath calculation.
Please, check it.
Original expression: the expected value is shown but not assigned to Rf. Rf just gets the first term, as the scope of the assignment operator is limited to the term 1/Utest. The remaining terms just change the displayed value but not the storage for Rf.
Rf:1/Utest-Aeff/{Ao*hsc}-Aeff/Aw*Rw-Aeff/{Ai*htc}=7.53296257076935*10^{-4}@{'hr*'ft^2*'Δ°F}/'BTU
Expression with parens, the displayed value is the same as before but now coincides with the value assigned to Rf
Rf: (1/Utest-Aeff/{Ao*hsc}-Aeff/Aw*Rw-Aeff/{Ai*htc})=7.53296257076931*10^{-4}@{'hr*'ft^2*'Δ°F}/'BTU
Expression as before, but with the outer parens deleted. There is no difference to the original expression in the serial representation from the clipboard, still the whole expression is assigned to Rf.
Rf:1/Utest-Aeff/{Ao*hsc}-Aeff/Aw*Rw-Aeff/{Ai*htc}=7.53296257076931*10^{-4}@{'hr*'ft^2*'Δ°F}/'BTU
The differences between first and third expressions are visible in the file (stack based UPN-like format) and this is obviously also the base of the actual calculation.
Core of the problem:
Non-unique translation between math storage format and both
- visual representation in the math region
- serialized text in the clipboard
What can you do?
- Watch the underline of the input marker when you type equations. It shows the scope of the currently entered operation.
- Watch in the dynamic assistant, what is actually stored in a definition. For numerical results, this is not straightforward to compare with displayed values, as usually some fraction of numbers is stored.
- If you only use undefined variables (switch off the assignments above) then you see the stored expression as a formula.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
3 пользователям понравился этот пост
#4 Опубликовано: 28.09.2016 11:24:16
Thank you very much for your quick and kind response!
It is very helpfull for me!!
It is very helpfull for me!!
#5 Опубликовано: 28.09.2016 13:36:05
WroteWhat can you do?
Actually this issue was fixed in latest versions of SMath Studio 0.98 and it is just impossible now to enter such equations - program will automatically add parenthesis where it is required.
The only chance to see this issue is to use previous versions of SMath Studio. At least I hope so

1 пользователям понравился этот пост
Davide Carpi 28.09.2016 18:43:00
#6 Опубликовано: 28.09.2016 23:59:59
On my side, this bug report ends here,
explained/examplified Smath 5346.
Appropriately cross-checked [sanity].
Jean
Bug report Comment.sm (27 КиБ) скачан 25 раз(а).
explained/examplified Smath 5346.
Appropriately cross-checked [sanity].
Jean
Bug report Comment.sm (27 КиБ) скачан 25 раз(а).
1 страниц (6 вхождений)
-
Новые сообщения
-
Нет новых сообщений