{"id":13413758,"url":"https://github.com/claygod/PiHex","last_synced_at":"2025-03-14T19:33:15.321Z","repository":{"id":54095474,"uuid":"63948013","full_name":"claygod/PiHex","owner":"claygod","description":"PiHex Library, written in Go, generates a hexadecimal number sequence in the number Pi in the range from 0 to 10,000,000.","archived":false,"fork":false,"pushed_at":"2024-10-18T19:22:54.000Z","size":27,"stargazers_count":20,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-25T05:24:50.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/claygod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-22T11:21:37.000Z","updated_at":"2024-10-18T19:22:58.000Z","dependencies_parsed_at":"2024-06-19T17:12:36.725Z","dependency_job_id":"999753f7-7f14-4220-8183-0c1776d2ab19","html_url":"https://github.com/claygod/PiHex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claygod%2FPiHex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claygod%2FPiHex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claygod%2FPiHex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claygod%2FPiHex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claygod","download_url":"https://codeload.github.com/claygod/PiHex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221498776,"owners_count":16833062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:48.378Z","updated_at":"2025-03-14T19:33:15.315Z","avatar_url":"https://github.com/claygod.png","language":"Go","readme":"# PiHex\nPiHex Library generates a hexadecimal number sequence in the number Pi in the range from 0 to 1.0e10000000. To calculate using \"Bailey-Borwein-Plouffe\" algorithm, instructions that was published by David H. Bailey September 17, 2006.\n\n[![API documentation](https://godoc.org/github.com/claygod/PiHex?status.svg)](https://godoc.org/github.com/claygod/PiHex)\n[![Go Report Card](https://goreportcard.com/badge/github.com/claygod/PiHex)](https://goreportcard.com/report/github.com/claygod/PiHex)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go)\n\n# Usage\n\nAn example of using the PiHex Library:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/claygod/PiHex\"\n)\n\nfunc main() {\n\tpi := PiHex.New()\n\tfmt.Print(\"The first 9 digits of Pi (hexadecimal): \", pi.Get(0, 9))\n}\n```\n\n# Settings\n\nIn the configuration file, you can change the constant STEP. This constant determines the amount generated in one step numbers. The reduction leads to a constant increase in the operating time of the program.\n\nAttention! This constant can not be more than 9! Limitation due to the 64-bit library architecture.\n\nThe configuration file [config.go](https://github.com/claygod/PiHex/blob/master/ph_config.go)\n\n# Perfomance\n\nTo optimize the run-time program, highly loaded sections of the library are performed in parallel (4 goroutines).\n\n# API\n\nMethods:\n-  *New* - create a new PiHex\n-  *Get* - receiving a sequence of hexadecimal digits starting at the specified position and in the right quantity.\n\nExample:\n\n```go\npi := PiHex.New()\nx :=  pi.Get(1000, 5)\n```\n\n# Algorithm\n\nThe Bailey–Borwein–Plouffe formula (BBP formula) is a spigot algorithm for computing the nth binary digit of Pi using base 16 math. The formula can directly calculate the value of any given digit of π without calculating the preceding digits. The BBP is a summation-style formula that was discovered in 1995 by Simon Plouffe and was named after the authors of the paper in which the formula was published, David H. Bailey, Peter Borwein, and Simon Plouffe.\n\n# Implementation\n\nPlays Library is based on the publication \"The BBP Algorithm for Pi\" of David H. Bailey on September 17, 2006: http://www.davidhbailey.com/dhbpapers/bbp-alg.pdf\n\n## Copyright\n\nCopyright © 2017-2025 Eduard Sesigin. All rights reserved. Contacts: claygod@yandex.ru\n","funding_links":[],"categories":["科学和数据分析","Science and Data Analysis","Relational Databases","科学与数据分析","数据分析与数据科学","\u003cspan id=\"科学和数据分析-science-and-data-analysis\"\u003e科学和数据分析 Science and Data Analysis\u003c/span\u003e"],"sub_categories":["Advanced Console UIs","HTTP Clients","HTTP客户端","查询语","交流","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaygod%2FPiHex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaygod%2FPiHex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaygod%2FPiHex/lists"}