String str={"0.5"};
Double d;
I wanted to store 0.5 into d

16th Apr 2021, 2:17 PM

bruce Gmeskel

0

Okay but i am trying to do a program that accept f(x) and evaluate it with an interval and i proceed with an infix evaluation method of stack but i cant accept a double value ?

16th Apr 2021, 2:34 PM

bruce Gmeskel

0

Any mathematical functions sucha as polynomial like X^3+x

16th Apr 2021, 3:40 PM

bruce Gmeskel

0

And which part of it is your wanted double value?
Sorry I am not so good in math ;)
But I guess you first need to split the String to separate each part of your function.
And than it should be possible to get your double value.

16th Apr 2021, 3:51 PM

Denise Roßberg

0

Yes that's right i separated intothe strings into char arr the i wantedvto replace the x variable by an interval or value so i tried to convert the interval which is double to string and store it on string but it only store the last value for instance 0.5 is my interval but it stores only 5