Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Simplify hanging. #27

@thunderkid

Description

@thunderkid

KAS hangs when I run the following:

const kasHang = 'x - ( ( - 2 ^ ( - 1 ) * y + z - 2 ^ ( - 1 ) * x * y + 2 * x * z + x ^ 2 * z ) * ( 1 + x ) ^ ( - 2 ) + 2 ^ ( - 1 ) * y - z ) / ( - ( - 2 ^ ( - 1 ) * y + z - 2 ^ ( - 1 ) * x * y + 2 * x * z + x ^ 2 * z ) * ( 1 + x ) ^ ( - 2 ) + z )';
const dd = KAS.parse(kasHang).expr;
const hung = dd.simplify().print(); 

It gets stuck in some infinite loop with stack traces like simplify -> factor -> simplify -> expand.

I haven't tried to hunt down the simplest case in which it hangs.

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