JuliaInterop / JuliaInterop/MathLink.jl
string() with weval-ed WExpr escape (\) some characters on arbitrary precision floating numbers with back quote
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 146
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Here is an example session:
julia> set_GreedyEval(false)
false
julia> a=W`17.00000000000000000000000000000`
17.`30.230448921378276
julia> string(a)
"17.`30.230448921378276"
julia> W"Sin"(W"Sqrt"(a))
W`Sin[Sqrt[17.`30.230448921378276]]`
julia> string(W"Sin"(W"Sqrt"(a)))
"W`Sin[Sqrt[17.`30.230448921378276]]`"
julia> weval(W"Sin"(W"Sqrt"(a)))
-0.8313391791635062080451600446002018832298332563980832506813`30.091141206520284
julia> string(W"Sin"(W"Sqrt"(a)))
"W`Sin[Sqrt[17.\0`30.23044892137827]]`"
In the output of the last command, the 0 after the dot is escaped. In fact I have encountered this issue several times with back quote in "Real" numbers. Note that apparently this only happens if 'weval' was used on the WExpr. After, it seems no longer possible to restore the previous behaviour:
julia> string(W"Sin"(W"Sqrt"(a)))
"W`Sin[Sqrt[17.`30.230448921378276]]`"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the session using set_GreedyEval(false), WExpr construction, weval, and string(). Start by tracing how string() serializes arbitrary-precision real values after weval. Done means back quotes and decimal characters are emitted without spurious escaping, while the reproduced WExpr output remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100