kidjapa/php-goalseek
最新稳定版本:1.0
Composer 安装命令:
composer require kidjapa/php-goalseek
包简介
A simple goalseek function for PHP. Using the goalseek function from Libre Office
README 文档
README
-
Php function to simulate Goal Seek from libre office using the Regula Falsi method.
-
In most cases the result is equal of the Excel formula. Because the Excel do not show what formula are used in goal seak we need to use the similar function in Libre Office.
-
Install
composer require kidjapa/php-goalseek
In Libre office
- Function in archive: core/sc/source/coredata/dcoumen4.cxx
bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, SCCOL nVCol, SCROW nVRow, SCTAB nVTab, const OUString& sValStr, double& nX )
Sample
$goalSeek = new SolveGoalSeek(); $getValue = 0; $getValue = $goalSeek->seekGoal( function($value, $data){ return sqrt($value); }, 16, // The Actual Value 20 // The Goal Value ); echo "------------- results ------------- \n"; echo "Result: ".$getValue."\n"; // Expect: 400
统计信息
- 总下载量: 2.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-17