package org.nwapw.abacus.number;

public class NaiveNumber implements Number {

    private double value;

    public NaiveNumber(double value) {
        this.value = value;
    }

    @Override
    public int precision() {
        return 4;
    }

    @Override
    public Number multiply(Number multiplier) {
        if(!(multiplier instanceof NaiveNumber)) throw new IllegalArgumentException();
        return new NaiveNumber(value * ((NaiveNumber)multiplier).value);
    }

    @Override
    public Number divide(Number divisor) {
        if(!(divisor instanceof NaiveNumber)) throw new IllegalArgumentException();
        return new NaiveNumber(value * ((NaiveNumber)divisor).value);
    }

    @Override
    public Number add(Number summand) {
        if(!(summand instanceof NaiveNumber)) throw new IllegalArgumentException();
        return new NaiveNumber(value * ((NaiveNumber)summand).value);
    }

    @Override
    public Number subtract(Number subtrahend) {
        if(!(subtrahend instanceof NaiveNumber)) throw new IllegalArgumentException();
        return new NaiveNumber(value * ((NaiveNumber)subtrahend).value);
    }

    @Override
    public Number negate() {
        return new NaiveNumber(-value);
    }
}

@@ -308,95 +308,8 @@
 ) %7B%0A
-        if(!(multiplier instanceof NaiveNumber)) throw new IllegalArgumentException();%0A
     
@@ -445,92 +445,8 @@
 ) %7B%0A
-        if(!(divisor instanceof NaiveNumber)) throw new IllegalArgumentException();%0A
     
@@ -470,33 +470,33 @@
 iveNumber(value 
-*
+/
  ((NaiveNumber)d
@@ -576,92 +576,8 @@
 ) %7B%0A
-        if(!(summand instanceof NaiveNumber)) throw new IllegalArgumentException();%0A
     
@@ -601,33 +601,33 @@
 iveNumber(value 
-*
++
  ((NaiveNumber)s
@@ -715,95 +715,8 @@
 ) %7B%0A
-        if(!(subtrahend instanceof NaiveNumber)) throw new IllegalArgumentException();%0A
     
@@ -740,33 +740,33 @@
 iveNumber(value 
-*
+-
  ((NaiveNumber)s

Fix copy pasting in NaiveNumber.