This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final double EPSILON = 0.00001; | |
public static double nullstelle2(double ug, double og) { | |
while (og - ug >= EPSILON) { | |
double ugErsteHaelfte = ug; | |
double ogErsteHaelfte = ug + (og - ug) / 2; | |
double ugZweiteHaelfte = ogErsteHaelfte; | |
double ogZweiteHaelfte = og; | |
if (Math.sin(ugErsteHaelfte) * Math.sin(ogErsteHaelfte) <= 0) { |
NewerOlder