5 added 507 characters in body
source | link

Java 10, 111 94 (or 92) bytes

s->{var a=s.split("N|=");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN±Y=X (without any spaces) instead of dN ± Y = X.

Try it online.

2 more bytes could be saved if the numbers are never outside the [-128, 127] range, in which case the last and one of the two first Float can be changed to Byte.
Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.split("N|=");          //  And split by "N" or "=" to a String-array
  return(int)((new Float(a[2])   //  Return the third number (after the equal sign),
               -new Float(a[1])) //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R + 0.5)`

Java 10, 111 94 bytes

s->{var a=s.split("N|=");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN±Y=X (without any spaces) instead of dN ± Y = X.

Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.split("N|=");          //  And split by "N" or "=" to a String-array
  return(int)((new Float(a[2])   //  Return the third number (after the equal sign),
               -new Float(a[1])) //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R + 0.5)`

Java 10, 111 94 (or 92) bytes

s->{var a=s.split("N|=");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN±Y=X (without any spaces) instead of dN ± Y = X.

Try it online.

2 more bytes could be saved if the numbers are never outside the [-128, 127] range, in which case the last and one of the two first Float can be changed to Byte.
Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.split("N|=");          //  And split by "N" or "=" to a String-array
  return(int)((new Float(a[2])   //  Return the third number (after the equal sign),
               -new Float(a[1])) //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R + 0.5)`
4 deleted 34 characters in body
source | link

Java 10, 112111 94 bytes

s->{var a=s.replaceAll("N|= ","").split(" ""N|=");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN ±Y = XdN±Y=X (without any spaces) instead of dN ± Y = X (I could save 1 more by by using the input format dN ±Y =X).

Try it online.Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.replaceAll("N|= ","")  //  Remove the "N" and "= " from the input
         .split(" ""N|=");            //  And split theby rest"N" byor spaces"=" asto a String-array
  return(int)((new Float(a[2])   //  Return the third number (after the "="equal sign),
               -new Float(a[1])) //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R+R + 0.5)`

Java 10, 112 bytes

s->{var a=s.replaceAll("N|= ","").split(" ");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN ±Y = X instead of dN ± Y = X (I could save 1 more by by using the input format dN ±Y =X).

Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.replaceAll("N|= ","")  //  Remove the "N" and "= " from the input
         .split(" ");            //  And split the rest by spaces as String-array
  return(int)((new Float(a[2])   //  Return the third number (after the "="),
               -new Float(a[1])) //  minus the second number,
              /new Float(a[0])   //  divided by the first number
         +.5);}                  //  Rounded by using `(int)(R+.5)`

Java 10, 111 94 bytes

s->{var a=s.split("N|=");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN±Y=X (without any spaces) instead of dN ± Y = X.

Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.split("N|=");          //  And split by "N" or "=" to a String-array
  return(int)((new Float(a[2])   //  Return the third number (after the equal sign),
               -new Float(a[1])) //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R + 0.5)`
3 Rollback to Revision 1
source | link

Java 10, 117112 bytes

s->{var a=s.replaceAll("N|= ","").split(" ");return(int)((new Float(a[3]a[2])-new Float(a[1]+a[2]a[1]))/new Float(a[0])+.5);}

Try it online. Input is in the format dN ±Y = X instead of dN ± Y = X (I could save 1 more by by using the input format dN ±Y =X).

Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.replaceAll("N|= ","")  //  Remove the "N" and "= " from the input
         .split(" ");            //  And split the rest by spaces as String-array
  return(int)((new Float(a[3]a[2])   //  Return the third number (after the equal sign"="),
               -new Float(a[1]+a[2]a[1]))
                                 //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R+.5)`

Java 10, 117 bytes

s->{var a=s.replaceAll("N|= ","").split(" ");return(int)((new Float(a[3])-new Float(a[1]+a[2]))/new Float(a[0])+.5);}

Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.replaceAll("N|= ","")  //  Remove the "N" and "= " from the input
         .split(" ");            //  And split the rest by spaces as String-array
  return(int)((new Float(a[3])   //  Return the third number (after the equal sign),
               -new Float(a[1]+a[2]))
                                 //   minus the second number (including leading +/-),
              /new Float(a[0])   //   divided by the first number
         +.5);}                  //  Rounded by using `(int)(R+.5)`

Java 10, 112 bytes

s->{var a=s.replaceAll("N|= ","").split(" ");return(int)((new Float(a[2])-new Float(a[1]))/new Float(a[0])+.5);}

Input is in the format dN ±Y = X instead of dN ± Y = X (I could save 1 more by by using the input format dN ±Y =X).

Try it online.

Explanation:

s->{                             // Method with String parameter and integer return-type
  var a=s.replaceAll("N|= ","")  //  Remove the "N" and "= " from the input
         .split(" ");            //  And split the rest by spaces as String-array
  return(int)((new Float(a[2])   //  Return the third number (after the "="),
               -new Float(a[1])) //  minus the second number,
              /new Float(a[0])   //  divided by the first number
         +.5);}                  //  Rounded by using `(int)(R+.5)`
2 deleted 38 characters in body
source | link
1
source | link