定制 kidjapa/php-goalseek 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固