Skip to content

string() with weval-ed WExpr escape (\) some characters on arbitrary precision floating numbers with back quote #94

@gvanuxem

Description

@gvanuxem

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]]`"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions