Re: errors in multiprecision

John Maddock via Boost-users <[email protected]> Fri, 21 Apr 2023 17:24:28 +0000
Newsgroups gmane.comp.lib.boost.user
Message-ID <010f0187a4d89069-3460609e-7263-45f2-8a4d-9c3e76f56af6-000000@us-east-2.amazonses.com>
On 20/04/2023 18:28, Gero Peterhoff via Boost-users wrote:
> Am 20.04.23 um 18:38 schrieb John Maddock via Boost-users:
>> On 20/04/2023 16:58, Gero Peterhoff via Boost-users wrote:
>>> Hi John,
>>> some functions do not work with multiprecision-integer-types, e.g.
>>>
>>> using T = boost::multiprecision::int256_t;
>>> using ::std::isinf;
>>>
>>> const auto x = T{5};
>>> const auto y = isinf(x); // ct error
>>> std::cout << y << std::endl;
>>>
>>> gives a CT error.
>>>
>> Correct.  Those functions are pretty meaningless in the context of 
>> integer types, and no one has ever asked for them.
>>
>> John.
>
>
> Ok, herewith I ask for it then :-) Finally this is relevant in the 
> template context or a functions with std- AND multiprecision-types 
> should/must work.

I'll add it to the list, but be aware that this is not always supported 
for regular integer types: 
https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:2,endLineNumber:6,positionColumn:2,positionLineNumber:6,selectionStartColumn:2,selectionStartLineNumber:6,startColumn:2,startLineNumber:6),source:'%23include+%3Ccmath%3E%0A%0Aint+main(int+argc)%0A%7B%0A++++return+std::isinf(argc)%3B%0A%7D%0A'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:33.333333333333336,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:vcpp_v19_33_x64,deviceViewOpen:'1',filters:(b:'0',binary:'0',binaryObject:'1',commentOnly:'0',demangle:'0',directives:'0',execute:'0',intel:'0',libraryCode:'0',trim:'1'),flagsViewOpen:'1',fontScale:15,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:'-O2',selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+x64+msvc+v19.33+(Editor+%231)',t:'0')),k:33.333333333333336,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:output,i:(compilerName:'x64+msvc+v19.latest',editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+x64+msvc+v19.33+(Compiler+%231)',t:'0')),k:33.33333333333333,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4

John.

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users