# Conversion of / to \frac misplaces bracket types.

« cadabra project page

An expression of the form

( 1/\sqrt{2 B b**2} )**2

gets translated to

{ \frac(1)(\sqrt{2 B b**2}) }**2

whereas it should have been

( \frac{1}{\sqrt{2 B b**2}} )**2

I.e. the brackets around the '/' should sit on the \frac, not on each of the children of \frac.

The actual problem sits in preprocessor.cc, which does

[a*b] -> \prod[a][b] [a/b] -> \frac[a][b] [a/b]**2 -> \pow{\frac[a][b]}{2}

but

[\frac{a}{b}] -> \frac{a}{b} [\frac{a}{b}]**2 -> \pow[\frac{a}{b}]

So the 'bug' is working the other way around: if you enter things in [\frac{a}{b}] notation, you should expect it to be different from [a/b]. Not sure whether this should be 'fixed'; postponing for the time being.

## Details

Id: | f2ada64adc88a3b4014456bc2d50863f242a1f12
Type: | bugfix
Creation time: | 2010-01-30 20:41 GMT
Creator: | Kasper Peeters <kasper.peeters@...>
Release: | unassigned
Component: | cadabra
Status: | unstarted

## Issue log

2010-02-06 18:12 GMT | Kasper Peeters <kasper.peeters@...> | edited description
2010-02-06 18:10 GMT | Kasper Peeters <kasper.peeters@...> | unassigned from release 1.18
2010-02-05 00:26 GMT | Kasper Peeters <kasper.peeters@...> | edited description
2010-01-30 20:41 GMT | Kasper Peeters <kasper.peeters@...> | created