-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow 2-argument piecewise; use Base.ifelse #251
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #251 +/- ##
==========================================
- Coverage 94.49% 93.39% -1.11%
==========================================
Files 10 10
Lines 818 817 -1
==========================================
- Hits 773 763 -10
- Misses 45 54 +9
☔ View full report in Codecov by Sentry. |
I just realised that the |
🤔 single-branch if in formulas is IMO a blasphemy but if SBML allows that we should support it... actually what does the specification say for the cases when the formula is false and the else-branch is missing? |
Agreed that it is blasphemy, but it is MathML, not SBML to blame for it. Even worse, I cannot find in the text I linked above or elsewhere what should happen if the formula evaluates false and the else statement is missing. But I would assume that the intention is that the function is not defined in that case. For me this translates to NaN or a DomainError. |
Why would we remove IfElse? (This was dragged in to increase the compatibility wth rest of the MTK ecosystem, has stuff changed?) |
https://github.com/SciML/IfElse.jl, increased the compatibility with the rest of the MTK ecosystem, but is now archived since the functionality is in base (I believe). |
Or is this why the test is failing? |
Btw I'm afraid we're not going to find any good material for this; the best I found is in MathML spec here: http://zvon.org/xxl/MathML/Output/el_piecewise.html . To interpret the missing maybe if @ChrisRackauckas has a moment -- is there any good way to translate the under-definedness here to Symbolics? in short:
|
oh nice I didn't know. I'll remove it. (any info on what's the julia version where it got interned?)
it says
looks like it interprets this as an Maybe you wanted |
Anyway yeah, the general problem here is that 1] MathML is meant as TeX encoded in XML and 2] SBML spec somehow seems to assume that MathML is interpretable as actual mathematics for free (it isn't). Let's wait for input from Symbolics folks and see. |
Closing in favor of #253 |
No description provided.