Skip to content

Msqrt returns wrong string #6

@Maximilian-Renner

Description

@Maximilian-Renner

Hello there,

here is some MathML that I've tested with your code:

<Math>
	<Msqrt>
		<Msup>
			<Mrow>
				<Mo>(</Mo>
				<Mi>a</Mi>
				<Mo>*</Mo>
				<Mi>b</Mi>
				<Mo>)</Mo>
			</Mrow>
			<Mn>2</Mn>
		</Msup>
	</Msqrt>
</Math>

This should represent the term: sqrt(a*b)^2
Tried to parse it with your parser. Objects where created correctly. But if I do use the method Visit, the StringBuilder contains the following string: "double a = 0.0;double b = 0.0;Math.Sqrt(*Math.Pow((a * b), 2));"

Take a look at the Math.Sqrt() ... there is an * too much. That will lead into compiling issues... I tried several things. This happens as soon as I have Math.Pow inside of Math.Sqrt. Please check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions