{"action":"created","issue":{"url":"https://api.github.com/repos/qmmd/bml/issues/7","labels_url":"https://api.github.com/repos/qmmd/bml/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/qmmd/bml/issues/7/comments","events_url":"https://api.github.com/repos/qmmd/bml/issues/7/events","html_url":"https://github.com/qmmd/bml/issues/7","id":119802234,"number":7,"title":"Enable precision consistent calculations","user":{"login":"aradi","id":2452321,"avatar_url":"https://avatars.githubusercontent.com/u/2452321?v=3","gravatar_id":"","url":"https://api.github.com/users/aradi","html_url":"https://github.com/aradi","followers_url":"https://api.github.com/users/aradi/followers","following_url":"https://api.github.com/users/aradi/following{/other_user}","gists_url":"https://api.github.com/users/aradi/gists{/gist_id}","starred_url":"https://api.github.com/users/aradi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aradi/subscriptions","organizations_url":"https://api.github.com/users/aradi/orgs","repos_url":"https://api.github.com/users/aradi/repos","events_url":"https://api.github.com/users/aradi/events{/privacy}","received_events_url":"https://api.github.com/users/aradi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-01T20:35:31Z","updated_at":"2015-12-01T22:16:30Z","closed_at":null,"body":"Routines which use additional to the bml-matrix also floating point input (e.g. the prefactor in `bml_scale()`) do not work from Fortran if the floating point input has single precision. Consequently, it is not possible to use the library from a Fortran code, which consistently uses only single point numbers. (See example below.)\r\n\r\n    program test\r\n      use bml\r\n\r\n      ! Working precision = single precision\r\n      integer, parameter :: wp = kind(1.0e0)\r\n      integer, parameter :: NN = 3\r\n      type(bml_matrix_t) :: aa\r\n      real(wp) :: prefac\r\n  \r\n      call bml_random_matrix(BML_MATRIX_DENSE, BML_PRECISION_SINGLE_REAL, NN, NN, &\r\n          & aa)\r\n      prefac = 2.0_wp\r\n      call bml_scale(prefac, aa)   ! Fails to compile\r\n  \r\n    end program test\r\n\r\nIn order to fix this, one would need to have accordingly typed routines in the C-API, which can then be wrapped in Fortran.\r\n"},"comment":{"url":"https://api.github.com/repos/qmmd/bml/issues/comments/161113471","html_url":"https://github.com/qmmd/bml/issues/7#issuecomment-161113471","issue_url":"https://api.github.com/repos/qmmd/bml/issues/7","id":161113471,"user":{"login":"nicolasbock","id":841385,"avatar_url":"https://avatars.githubusercontent.com/u/841385?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasbock","html_url":"https://github.com/nicolasbock","followers_url":"https://api.github.com/users/nicolasbock/followers","following_url":"https://api.github.com/users/nicolasbock/following{/other_user}","gists_url":"https://api.github.com/users/nicolasbock/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasbock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasbock/subscriptions","organizations_url":"https://api.github.com/users/nicolasbock/orgs","repos_url":"https://api.github.com/users/nicolasbock/repos","events_url":"https://api.github.com/users/nicolasbock/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasbock/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T22:16:30Z","updated_at":"2015-12-01T22:16:30Z","body":"Would you want complex scalar parameters as well, or are you thinking of single/double reals only?"}}