The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Solve: "bad guess(es)" error...
05-30-2015, 11:16 PM
Post: #1
Solve: "bad guess(es)" error...
hi,
why this code
Code:

EXPORT provasol()
BEGIN
local yield, coupon, ann, years, price;
coupon:=6.75;
ann:=2;
years:=14;
price:=122.125;
yield := Solve.SOLVE((coupon/ann)*( (1-1/(1+(X/ann))^(ann*years)) / (X/ann) ) + 100/(1+(X/ann))^(ann*years) = price, X);
RETURN yield;
END;

gives error "Bad Guesses"?
If I try with the values in Home I get the correct answer: 0.0459035...
Code:

Solve.SOLVE((6.75/2)*( (1-1/(1+(X/2))^(2*14)) / (X/2) ) + 100/(1+(X/2))^(2*14) = 122.125, X);

Thank you
Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Solve: "bad guess(es)" error... - salvomic - 05-30-2015 11:16 PM
RE: Solve: "bad guess(es)" error... - DrD - 05-31-2015, 10:31 AM



User(s) browsing this thread: 1 Guest(s)