Skip to content

Instantly share code, notes, and snippets.

@mgaitan
Created September 9, 2013 22:48
Show Gist options
  • Select an option

  • Save mgaitan/6502536 to your computer and use it in GitHub Desktop.

Select an option

Save mgaitan/6502536 to your computer and use it in GitHub Desktop.
how many bytes has each kind of reals
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"%load_ext fortranmagic"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"%%fortran\n",
"\n",
"subroutine real_bytes(simple, doble)\n",
" integer, intent(out) :: simple, doble\n",
" simple = kind(0.0d0)\n",
" doble = kind(0.0)\n",
"end subroutine"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"real_bytes()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"text": [
"(8, 4)"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 3
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment