{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/comments/189410003","pull_request_review_id":121592452,"id":189410003,"diff_hunk":"@@ -0,0 +1,66 @@\n+\"\"\"\n+Helper function for quadratic_interval\n+\"\"\"\n+function quadratic_helper(a::Number, b::Number, c::Number, L::AbstractArray)\n+\n+    Δ = b*b - 4*a*c\n+\n+    Δ < 0 && return\n+\n+    Δ = sqrt(Δ)\n+\n+    if (b >= 0)\n+        x0 = -0.5 * (b + Δ)\n+\n+    else\n+        x0 = -0.5 * (b - Δ)\n+    end\n+\n+    if (x0 == 0)\n+        x1 = x0\n+\n+    else\n+        x1 = c / x0\n+        x0 = x0 / a\n+        push!(L, x1)\n+    end\n+\n+    push!(L, x0)\n+end\n+\n+\n+\"\"\"\n+Function to solve a quadratic equation where the coefficients are intervals.\n+Returns an array of intervals of the roots.\n+Eldon Hansen and G. William Walster : Global Optimization Using Interval Analysis - Chapter 8\n+\"\"\"\n+function quadratic_interval{T}(a::Interval{T}, b::Interval{T}, c::Interval{T})\n+\n+    L = T[]\n+    R = Interval{T}[]\n+\n+    quadratic_helper(a.lo, b.lo, c.lo, L)\n+    quadratic_helper(a.hi, b.hi, c.hi, L)\n+    quadratic_helper(a.lo, b.hi, c.lo, L)\n+    quadratic_helper(a.hi, b.lo, c.hi, L)\n+\n+    if (length(L) == 8)","path":"src/quadratic.jl","position":47,"original_position":47,"commit_id":"c7b85029089ea9d2c0b035c16a4e3a895960b8f0","original_commit_id":"c7b85029089ea9d2c0b035c16a4e3a895960b8f0","user":{"login":"eeshan9815","id":26198993,"avatar_url":"https://avatars3.githubusercontent.com/u/26198993?v=4","gravatar_id":"","url":"https://api.github.com/users/eeshan9815","html_url":"https://github.com/eeshan9815","followers_url":"https://api.github.com/users/eeshan9815/followers","following_url":"https://api.github.com/users/eeshan9815/following{/other_user}","gists_url":"https://api.github.com/users/eeshan9815/gists{/gist_id}","starred_url":"https://api.github.com/users/eeshan9815/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeshan9815/subscriptions","organizations_url":"https://api.github.com/users/eeshan9815/orgs","repos_url":"https://api.github.com/users/eeshan9815/repos","events_url":"https://api.github.com/users/eeshan9815/events{/privacy}","received_events_url":"https://api.github.com/users/eeshan9815/received_events","type":"User","site_admin":false},"body":"The length of `L` can only be 8 if all `a`, `b` and `c` are degenerate intervals, otherwise it can only reach 6 since an interval quadratic equation can only return a maximum of 3 intervals.\r\nIf degenerate intervals are provided, 2 such intervals are redundant and can be removed by keeping only the first four entries of `L`.\r\n","created_at":"2018-05-18T22:53:47Z","updated_at":"2018-05-18T22:53:47Z","html_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl/pull/68#discussion_r189410003","pull_request_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/comments/189410003"},"html":{"href":"https://github.com/JuliaIntervals/IntervalRootFinding.jl/pull/68#discussion_r189410003"},"pull_request":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68"}},"in_reply_to_id":189366708},"pull_request":{"url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68","id":189035102,"html_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl/pull/68","diff_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl/pull/68.diff","patch_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl/pull/68.patch","issue_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues/68","number":68,"state":"open","locked":false,"title":"Add solvers for quadratic interval equations","user":{"login":"eeshan9815","id":26198993,"avatar_url":"https://avatars3.githubusercontent.com/u/26198993?v=4","gravatar_id":"","url":"https://api.github.com/users/eeshan9815","html_url":"https://github.com/eeshan9815","followers_url":"https://api.github.com/users/eeshan9815/followers","following_url":"https://api.github.com/users/eeshan9815/following{/other_user}","gists_url":"https://api.github.com/users/eeshan9815/gists{/gist_id}","starred_url":"https://api.github.com/users/eeshan9815/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeshan9815/subscriptions","organizations_url":"https://api.github.com/users/eeshan9815/orgs","repos_url":"https://api.github.com/users/eeshan9815/repos","events_url":"https://api.github.com/users/eeshan9815/events{/privacy}","received_events_url":"https://api.github.com/users/eeshan9815/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-18T13:58:58Z","updated_at":"2018-05-18T22:53:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1a42b8790e584f293b176857b5c0a04fe845797","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68/commits","review_comments_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68/comments","review_comment_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues/68/comments","statuses_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/statuses/c7b85029089ea9d2c0b035c16a4e3a895960b8f0","head":{"label":"eeshan9815:quadratic","ref":"quadratic","sha":"c7b85029089ea9d2c0b035c16a4e3a895960b8f0","user":{"login":"eeshan9815","id":26198993,"avatar_url":"https://avatars3.githubusercontent.com/u/26198993?v=4","gravatar_id":"","url":"https://api.github.com/users/eeshan9815","html_url":"https://github.com/eeshan9815","followers_url":"https://api.github.com/users/eeshan9815/followers","following_url":"https://api.github.com/users/eeshan9815/following{/other_user}","gists_url":"https://api.github.com/users/eeshan9815/gists{/gist_id}","starred_url":"https://api.github.com/users/eeshan9815/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeshan9815/subscriptions","organizations_url":"https://api.github.com/users/eeshan9815/orgs","repos_url":"https://api.github.com/users/eeshan9815/repos","events_url":"https://api.github.com/users/eeshan9815/events{/privacy}","received_events_url":"https://api.github.com/users/eeshan9815/received_events","type":"User","site_admin":false},"repo":{"id":124342985,"name":"IntervalRootFinding.jl","full_name":"eeshan9815/IntervalRootFinding.jl","owner":{"login":"eeshan9815","id":26198993,"avatar_url":"https://avatars3.githubusercontent.com/u/26198993?v=4","gravatar_id":"","url":"https://api.github.com/users/eeshan9815","html_url":"https://github.com/eeshan9815","followers_url":"https://api.github.com/users/eeshan9815/followers","following_url":"https://api.github.com/users/eeshan9815/following{/other_user}","gists_url":"https://api.github.com/users/eeshan9815/gists{/gist_id}","starred_url":"https://api.github.com/users/eeshan9815/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeshan9815/subscriptions","organizations_url":"https://api.github.com/users/eeshan9815/orgs","repos_url":"https://api.github.com/users/eeshan9815/repos","events_url":"https://api.github.com/users/eeshan9815/events{/privacy}","received_events_url":"https://api.github.com/users/eeshan9815/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eeshan9815/IntervalRootFinding.jl","description":"Guaranteed root finding with Julia","fork":true,"url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl","forks_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/forks","keys_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/teams","hooks_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/hooks","issue_events_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/issues/events{/number}","events_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/events","assignees_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/assignees{/user}","branches_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/branches{/branch}","tags_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/tags","blobs_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/languages","stargazers_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/stargazers","contributors_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/contributors","subscribers_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/subscribers","subscription_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/subscription","commits_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/contents/{+path}","compare_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/merges","archive_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/downloads","issues_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/issues{/number}","pulls_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/labels{/name}","releases_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/releases{/id}","deployments_url":"https://api.github.com/repos/eeshan9815/IntervalRootFinding.jl/deployments","created_at":"2018-03-08T05:45:02Z","updated_at":"2018-05-13T05:00:43Z","pushed_at":"2018-05-18T16:25:26Z","git_url":"git://github.com/eeshan9815/IntervalRootFinding.jl.git","ssh_url":"git@github.com:eeshan9815/IntervalRootFinding.jl.git","clone_url":"https://github.com/eeshan9815/IntervalRootFinding.jl.git","svn_url":"https://github.com/eeshan9815/IntervalRootFinding.jl","homepage":"","size":725,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaIntervals:master","ref":"master","sha":"bfd84fb098f244dbc9a7332692fbe2dcf4b332d5","user":{"login":"JuliaIntervals","id":26843058,"avatar_url":"https://avatars1.githubusercontent.com/u/26843058?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaIntervals","html_url":"https://github.com/JuliaIntervals","followers_url":"https://api.github.com/users/JuliaIntervals/followers","following_url":"https://api.github.com/users/JuliaIntervals/following{/other_user}","gists_url":"https://api.github.com/users/JuliaIntervals/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaIntervals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaIntervals/subscriptions","organizations_url":"https://api.github.com/users/JuliaIntervals/orgs","repos_url":"https://api.github.com/users/JuliaIntervals/repos","events_url":"https://api.github.com/users/JuliaIntervals/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaIntervals/received_events","type":"Organization","site_admin":false},"repo":{"id":87006091,"name":"IntervalRootFinding.jl","full_name":"JuliaIntervals/IntervalRootFinding.jl","owner":{"login":"JuliaIntervals","id":26843058,"avatar_url":"https://avatars1.githubusercontent.com/u/26843058?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaIntervals","html_url":"https://github.com/JuliaIntervals","followers_url":"https://api.github.com/users/JuliaIntervals/followers","following_url":"https://api.github.com/users/JuliaIntervals/following{/other_user}","gists_url":"https://api.github.com/users/JuliaIntervals/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaIntervals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaIntervals/subscriptions","organizations_url":"https://api.github.com/users/JuliaIntervals/orgs","repos_url":"https://api.github.com/users/JuliaIntervals/repos","events_url":"https://api.github.com/users/JuliaIntervals/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaIntervals/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl","description":"Find all roots of a function in a guaranteed way with Julia","fork":false,"url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl","forks_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/forks","keys_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/teams","hooks_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/events","assignees_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/tags","blobs_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/subscription","commits_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/merges","archive_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/downloads","issues_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/deployments","created_at":"2017-04-02T18:19:31Z","updated_at":"2018-05-17T06:40:37Z","pushed_at":"2018-05-18T21:13:23Z","git_url":"git://github.com/JuliaIntervals/IntervalRootFinding.jl.git","ssh_url":"git@github.com:JuliaIntervals/IntervalRootFinding.jl.git","clone_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl.git","svn_url":"https://github.com/JuliaIntervals/IntervalRootFinding.jl","homepage":"","size":710,"stargazers_count":20,"watchers_count":20,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":7,"open_issues":23,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68"},"html":{"href":"https://github.com/JuliaIntervals/IntervalRootFinding.jl/pull/68"},"issue":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues/68"},"comments":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaIntervals/IntervalRootFinding.jl/statuses/c7b85029089ea9d2c0b035c16a4e3a895960b8f0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eeshan9815"}}