Skip to content

Problems with tform and ModuleOption,sum #271

@jodavies

Description

@jodavies

If test contains more than 2 terms, the following does not work properly under tform (even with 1 worker)

#-
Off Statistics;

CFunction f;
Symbol x,y,z;

*Local test = f(1)*x - f(2)*y;
Local test = f(1)*x - f(2)*y + f(3)*z;
Bracket f;
.sort
Keep Brackets;

#$split = 0;
$split = $split + term_;
Print "%w %$", $split;

Bracket f;
ModuleOption sum $split;
.sort

Local split = $split;

#do i = split
	Local [testsplit`i'] = test[`i'];
#enddo

Print +s;
.end

It gives either

   split =
       + f(1)
       + f(2)
      ;

or

   split =
       + f(1)
       + f(3)
      ;

depending on the run.

(As an aside: is there a better way to get bracket contents into local expressions, when you don't know what you're bracketing against?)

Thanks,
Josh.

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