Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,324
Issues
4,324
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
376
Merge Requests
376
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
355b1b18
Commit
355b1b18
authored
Apr 24, 2012
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test Trac
#5997
parent
f9263994
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
testsuite/tests/simplCore/should_run/T5997.hs
testsuite/tests/simplCore/should_run/T5997.hs
+27
-0
testsuite/tests/simplCore/should_run/T5997.stdout
testsuite/tests/simplCore/should_run/T5997.stdout
+1
-0
testsuite/tests/simplCore/should_run/all.T
testsuite/tests/simplCore/should_run/all.T
+2
-0
No files found.
testsuite/tests/simplCore/should_run/T5997.hs
0 → 100644
View file @
355b1b18
{-# LANGUAGE BangPatterns #-}
module
Main
where
incompleteBetaWorker
::
Double
->
Double
incompleteBetaWorker
_
=
loop
1
1
1
1
where
-- Constants
eps
=
1e-15
-- Loop
loop
::
Double
->
Int
->
Double
->
Double
->
Double
loop
!
psq
!
ns
!
term
!
betain
|
done
=
betain'
|
ns
>
10000000
=
betain'
|
otherwise
=
loop
psq'
(
ns
+
1
)
term'
betain'
where
-- New values
term'
=
term
betain'
=
betain
psq'
=
if
ns
<
0
then
psq
+
1
else
psq
-- This condition cause stack overflow
done
=
db
<=
eps
&&
db
<=
eps
*
betain'
where
db
=
abs
term'
-- With this it loops endlessly
-- done = db <= eps * betain' where db = abs term'
main
::
IO
()
main
=
print
$
incompleteBetaWorker
0
testsuite/tests/simplCore/should_run/T5997.stdout
0 → 100644
View file @
355b1b18
1.0
testsuite/tests/simplCore/should_run/all.T
View file @
355b1b18
...
...
@@ -55,3 +55,5 @@ test('T5625', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run,
test
('
T5587
',
[
only_ways
(['
normal
','
optasm
']),
exit_code
(
1
)
],
compile_and_run
,
[''])
test
('
T5915
',
only_ways
(['
normal
','
optasm
']),
compile_and_run
,
[''])
test
('
T5920
',
only_ways
(['
normal
','
optasm
']),
compile_and_run
,
[''])
test
('
T5997
',
normal
,
compile_and_run
,
[''])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment