mirror of
				https://github.com/DanilaFe/abacus
				synced 2025-11-04 02:43:41 -08:00 
			
		
		
		
	Fix bug causing an NPE when sqrt() was called.
This commit is contained in:
		
							parent
							
								
									2cc4bd14ce
								
							
						
					
					
						commit
						c9fad36d16
					
				@ -6,9 +6,6 @@ import org.nwapw.abacus.function.OperatorAssociativity;
 | 
			
		||||
import org.nwapw.abacus.number.NaiveNumber;
 | 
			
		||||
import org.nwapw.abacus.number.NumberInterface;
 | 
			
		||||
 | 
			
		||||
import javax.print.attribute.standard.MediaSize;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.function.BiFunction;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -231,7 +228,7 @@ public class StandardPlugin extends Plugin {
 | 
			
		||||
 | 
			
		||||
            @Override
 | 
			
		||||
            protected NumberInterface applyInternal(NumberInterface[] params) {
 | 
			
		||||
                return StandardPlugin.this.getFunction("pow").apply(params[0], (new NaiveNumber(0.5)));
 | 
			
		||||
                return StandardPlugin.this.getOperator("^").getFunction().apply(params[0], (new NaiveNumber(0.5)));
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user