<p>In the interim, we can modernize fdlibm, it's easier than creating a new plugin from scratch, and it will preserve bit-identical backward compatibility with OpenCobalt/Terf/... while changing the underlying libm would require a simultaneous change of all the VM participating.</p>
<p>After searching for similar work in github, I saw that I would be better served by myself and gave it a go: <a href="https://github.com/nicolas-cellier-aka-nice/fdlibm/">https://github.com/nicolas-cellier-aka-nice/fdlibm/</a></p>
<p>I've run some smoke tests, but did not commit the test yet...<br>
The reason is that I tried to add dependency to googletest via git subtree, and it was a bad idea: <a href="https://stackoverflow.com/questions/12858199/how-to-rebase-after-git-subtree-add" rel="nofollow">https://stackoverflow.com/questions/12858199/how-to-rebase-after-git-subtree-add</a>.</p>
<p>I crafted the tests with ArbitraryPrecisionFloat package (from squeaksource), but generating the reference results is quite slow. If someone knows of existing test suite for libm, that might help.</p>
<p>If someone wants to try it, just overwrite the fdlibm files with  my master branch. No special flags required (except <code>D_IEEE_LIBM</code>). My smoke tests pass with <code>-O2</code>, so should the OpenSmalltalk VM.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/315#issuecomment-445472358">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW8Usu1PhVaepnUx8pzEqG9R1sE-_ks5u2-yfgaJpZM4Y_jtg">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW2jZPaEyJUduZzv3h85doNBoCmzhks5u2-yfgaJpZM4Y_jtg.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@nicolas-cellier-aka-nice in #315: In the interim, we can modernize fdlibm, it's easier than creating a new plugin from scratch, and it will preserve bit-identical backward compatibility with OpenCobalt/Terf/... while changing the underlying libm would require a simultaneous change of all the VM participating.\r\n\r\nAfter searching for similar work in github, I saw that I would be better served by myself and gave it a go: https://github.com/nicolas-cellier-aka-nice/fdlibm/\r\n\r\nI've run some smoke tests, but did not commit the test yet...\r\nThe reason is that I tried to add dependency to googletest via git subtree, and it was a bad idea: https://stackoverflow.com/questions/12858199/how-to-rebase-after-git-subtree-add.\r\n\r\nI crafted the tests with ArbitraryPrecisionFloat package (from squeaksource), but generating the reference results is quite slow. If someone knows of existing test suite for libm, that might help.\r\n\r\nIf someone wants to try it, just overwrite the fdlibm files with  my master branch. No special flags required (except `D_IEEE_LIBM`). My smoke tests pass with `-O2`, so should the OpenSmalltalk VM.\r\n"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/315#issuecomment-445472358"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/315#issuecomment-445472358",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/315#issuecomment-445472358",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [OpenSmalltalk/opensmalltalk-vm] We need a solution  for cross-platform bit-identical floating point. (#315)",
"sections": [
{
"text": "",
"activityTitle": "**Nicolas Cellier**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@nicolas-cellier-aka-nice",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 315,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 315\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/315#issuecomment-445472358"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 419314528\n}"
}
],
"themeColor": "26292E"
}
]</script>