josdejong/mathjs

UnaryMinus around ConstantNode not mached by "c" in simplify

Open

#1,406 创建于 2019年2月15日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)JavaScript (1,298 fork)batch import
featurehelp wanted

仓库指标

Star
 (13,832 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

A unaryMinus wrapped around a ConstantNode is matched by "v", not "c", in the simplify function. While this matches the documentation, it is not what is expected for a "constant" and a "non-constant". Other single variable functions with a constant node are simplified to their result, and thus can be matched with "c". If existing compatibility presents an issue, this could be enabled as an option of the simplify function that defaults to the old behavior or by adding two new simplification selectors.

贡献者指南