1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
7 <title>Conversion of / to \frac misplaces bracket types.
</title>
8 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
9 <link rel=
"stylesheet" href=
"style.css" type=
"text/css" />
16 <h1>Conversion of / to \frac misplaces bracket types.
</h1>
17 <div class=
"backptr"><a href=
"index.html">« cadabra project page
</a></div>
20 <div class=
"description">
21 <p>An expression of the form
</p><p> (
1/\sqrt{
2 B b**
2} )**
2</p><p>gets translated to
</p><p> { \frac(
1)(\sqrt{
2 B b**
2}) }**
2</p><p>whereas it should have been
</p><p> ( \frac{
1}{\sqrt{
2 B b**
2}} )**
2</p><p>I.e. the brackets around the '/' should sit on the \frac, not
22 on each of the children of \frac.
</p><p>The actual problem sits in preprocessor.cc, which does
</p><p>[a*b] -
> \prod[a][b]
23 [a/b] -
> \frac[a][b]
24 [a/b]**
2 -
> \pow{\frac[a][b]}{
2}
</p><p>but
</p><p>[\frac{a}{b}] -
> \frac{a}{b}
25 [\frac{a}{b}]**
2 -
> \pow[\frac{a}{b}]
</p><p>So the 'bug' is working the other way around: if you enter
26 things in [\frac{a}{b}] notation, you should expect it to
27 be different from [a/b]. Not sure whether this should be
28 'fixed'; postponing for the time being.
</p>
36 <td class=
"attrname">Id:
</td>
37 <td class=
"attrval"><span class=
"id">f2ada64adc88a3b4014456bc2d50863f242a1f12
</span></td>
41 <td class=
"attrname">Type:
</td>
42 <td class=
"attrval">bugfix
</td>
46 <td class=
"attrname">Creation time:
</td>
47 <td class=
"attrval">2010-
01-
30 20:
41 GMT
</td>
51 <td class=
"attrname">Creator:
</td>
52 <td class=
"attrval"><span class=
"person">Kasper Peeters
<kasper.peeters@...
></span></td>
58 <td class=
"attrname">Release:
</td>
61 <a href=
"unassigned.html">unassigned
</a>
67 <td class=
"attrname">Component:
</td>
68 <td class=
"attrval"><a href=
"component-cadabra.html">cadabra
</a></td>
72 <td class=
"attrname">Status:
</td>
91 <td class=
"date">2010-
02-
06 18:
12 GMT
</td>
92 <td class=
"person">Kasper Peeters
<kasper.peeters@...
></td>
93 <td class=
"message">edited description
</td>
99 <td class=
"date">2010-
02-
06 18:
10 GMT
</td>
100 <td class=
"person">Kasper Peeters
<kasper.peeters@...
></td>
101 <td class=
"message">unassigned from release
1.18</td>
106 <tr class=
"even-row">
107 <td class=
"date">2010-
02-
05 00:
26 GMT
</td>
108 <td class=
"person">Kasper Peeters
<kasper.peeters@...
></td>
109 <td class=
"message">edited description
</td>
115 <td class=
"date">2010-
01-
30 20:
41 GMT
</td>
116 <td class=
"person">Kasper Peeters
<kasper.peeters@...
></td>
117 <td class=
"message">created
</td>
126 <div class=
"footer">Generated by
<a href=
"http://ditz.rubyforge.org/">ditz
</a>.
</div>