Search found 3647 matches
- Mon Feb 19, 2024 4:23 pm
- Forum: Feature Requests and Wishlists
- Topic: FormatNumber should respect the locale settings, and what about FormatCurrency?
- Replies: 6
- Views: 294
Re: FormatNumber should respect the locale settings, and what about FormatCurrency?
Why should I create my own mapping from country/language to decimal point and thousand separator if it already exists within the operating system? I'm not saying you should and I'm not against local support but your request was to change the behavior of the current FormatNumber procedure to use the...
- Mon Feb 19, 2024 2:36 pm
- Forum: Feature Requests and Wishlists
- Topic: FormatNumber should respect the locale settings, and what about FormatCurrency?
- Replies: 6
- Views: 294
Re: FormatNumber should respect the locale settings, and what about FormatCurrency?
The function `FormatNumber` uses static default values for the 1000s separator and the decimal point. Instead it would make way more sense to respect the locale settings. FormatNumber does allow you to specify what to use FormatNumber(Number.d [, NbDecimals [, DecimalPoint$ [, ThousandSeparator$]]]...
- Wed Feb 14, 2024 7:23 am
- Forum: Tricks 'n' Tips
- Topic: ASM and C-backend bswap16/32/64
- Replies: 13
- Views: 3069
Re: ASM and C-backend bswap16/32/64
I'm curious about the reason behind the choice.
movbe is a nice instruction but only supported since about 2013.
At the moment my desktop computer from 2012 is still good enough for my needs.
I imagine I'm not the only one still using such an old computer.
- Thu Feb 08, 2024 2:52 pm
- Forum: Bugs - Windows
- Topic: Infinity minus infinity bug
- Replies: 5
- Views: 756
Re: Infinity minus infinity bug
The C compiler uses FUCOMIP instead of FCOMP for x86 and UCOMISD for x64. Both FUCOMIP and UCOMISD set the zero, parity and carry flags so you don't have to store the status word in this case. The parity flag is evaluated first. If it is set, the compared values are not equal. If parity is not set, ...
- Thu Feb 08, 2024 8:10 am
- Forum: Bugs - Windows
- Topic: Wrong result for comparisons with NaN (ASM backend)
- Replies: 2
- Views: 255
Re: Wrong result for comparisons with NaN (ASM backend)
I think it's related to this problem I posted before
https://www.purebasic.fr/english/viewtopic.php?p=607695
https://www.purebasic.fr/english/viewtopic.php?p=607695
- Tue Feb 06, 2024 8:09 am
- Forum: Tricks 'n' Tips
- Topic: Fast String Functions using MMX
- Replies: 9
- Views: 837
Re: Fast String Functions using MMX
The help says only xmm0..xmm3 are volatile! Is the help wrong here? I don't know why the help says that. :? The calling conventions say something different. Windows uses the "x64 calling convention" for 64 bit applications. Linux and macOS use the "AMD System V ABI" . Here's a q...
- Mon Feb 05, 2024 7:25 am
- Forum: Tricks 'n' Tips
- Topic: Fast String Functions using MMX
- Replies: 9
- Views: 837
Re: Fast String Functions using MMX
Until now my opinion was MM0 is the lo-part of XMM0. But that's not the case! XMM-Registers are seperate Registers. So I have to add EMMS instruction! Thank's very much! Using XMM-Register would be better! But this is not so easy because as I know, there is no direct MOV between 64-Bit-CPU-Register...
- Sun Feb 04, 2024 9:01 am
- Forum: Tricks 'n' Tips
- Topic: Fast String Functions using MMX
- Replies: 9
- Views: 837
- Sat Jan 13, 2024 6:38 pm
- Forum: Coding Questions
- Topic: Unicode question
- Replies: 25
- Views: 1625
Re: Unicode question
My goal is to know if I can do that without a loop (For...Next, While...Wend) and read the string from memory as PeekS() can do it. Maybe a windows API ? or else... Why are you looking for something without a loop ? A function like PeekS or WideCharToMultiByte also uses a loop internally. The diffe...
- Thu Jan 04, 2024 10:16 am
- Forum: Coding Questions
- Topic: Strange behavior of Abs()! @PureBasicTeam
- Replies: 25
- Views: 1893
Re: Strange behavior of Abs()! @PureBasicTeam
With the c backend you could also use llabs
Code: Select all
int64.q = -100000000000000005
!v_int64 = llabs(v_int64);
Debug int64
- Fri Dec 15, 2023 1:48 pm
- Forum: Windows
- Topic: Very fast split string to array function
- Replies: 29
- Views: 12220
Re: Very fast split string to array function
I know it's a pretty old one :? but I can't get your zip. I guess there should be some code updates since 2004... You can still down;oad it https://w73.nl/pb/split.zip but it's not a code source but a user library. I don't even know if I still have the original source code and if it still works it ...
- Tue Dec 05, 2023 1:27 pm
- Forum: Coding Questions
- Topic: Which one is faster
- Replies: 24
- Views: 1670
Re: Which one is faster
some modifications (again) so that the calculations are done with the backendc + optimization (X3 for me !) If you take a look at the generated asm code, you will see that that still isn't enough. :wink: The C compiler is so good at optimizing that 1. The procedure isn't called like the asm backend...
- Tue Dec 05, 2023 8:50 am
- Forum: Coding Questions
- Topic: Which one is faster
- Replies: 24
- Views: 1670
Re: Which one is faster
Code: Select all
Procedure Limit(x.l)
; limit between 0 and 255
!movd xmm0, [p.v_x]
!packssdw xmm0, xmm0
!packuswb xmm0, xmm0
!movd eax, xmm0
ProcedureReturn
EndProcedure
Debug Limit(-10)
Debug Limit(1000)
Debug Limit(100)
- Sun Dec 03, 2023 2:24 pm
- Forum: Tricks 'n' Tips
- Topic: BigInt module (SSE2)
- Replies: 44
- Views: 19791
Re: BigInt module (SSE2)
Try moving the *vn declaration inside the divmod_private procedure to the line above like this.
Code: Select all
Protected.BigInt un, vn, *vn
Protected.i qhat, rhat, *un.Quad
- Sun Nov 05, 2023 7:19 pm
- Forum: Coding Questions
- Topic: Reconstructing original frames from interpolated movie
- Replies: 28
- Views: 2535