55a2a513c16061469bbbc7bb2a29639fb63ffd24,mathics/builtin/numeric.py,MachinePrecision,apply_N,#MachinePrecision#Any#Any#,197

Before Change


    def apply_N(self, prec, evaluation):
        "N[MachinePrecision, prec_]"

        prec = get_precision(prec, evaluation)
        if prec is not None:
            return Real(dps(machine_precision), prec)


class Precision(Builtin):
    
    <dl>
    <dt>"Precision[$expr$]"

After Change


    def apply_N(self, prec, evaluation):
        "N[MachinePrecision, prec_]"

        if prec == Symbol("MachinePrecision"):
            // avoids recursion
            return MachineReal(machine_precision * math.log10(2))
        return Expression("N",
            Expression("Times", Expression("Log", Integer(10), Integer(2)),
                       Integer(machine_precision)), prec)


class Precision(Builtin):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: mathics/Mathics
Commit Name: 55a2a513c16061469bbbc7bb2a29639fb63ffd24
Time: 2016-08-05
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/numeric.py
Class Name: MachinePrecision
Method Name: apply_N


Project Name: mathics/Mathics
Commit Name: 51b2e962f4891e7563543db5560e2bdc9a20bd6d
Time: 2016-08-05
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/exptrig.py
Class Name: E
Method Name: apply_N


Project Name: mathics/Mathics
Commit Name: 51b2e962f4891e7563543db5560e2bdc9a20bd6d
Time: 2016-08-05
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/exptrig.py
Class Name: Pi
Method Name: apply_N