Re: Giving up

2022-08-06 Thread kdevel via Digitalmars-d-announce
Good catch! On Saturday, 6 August 2022 at 17:27:30 UTC, Rumbu wrote: [...] long double x = 0x1p-16383; dmd -c test2.c test2.c(3): Error: number `0x1p-16383` is not representable It is. But not in the double type and `0x1p-16383` is a double not a long double. [...] Also the value

Re: Giving up

2022-08-06 Thread kdevel via Digitalmars-d-announce
On Saturday, 6 August 2022 at 06:03:59 UTC, Vladimir Panteleev wrote: On Friday, 5 August 2022 at 15:36:06 UTC, Rumbu wrote: [...] The last version where this compiled successfully was D 0.116, released on March 7, 2005. Perhaps you may have had a bug in your test suite which caused these lin

Re: Giving up

2022-08-05 Thread kdevel via Digitalmars-d-announce
Hi Rumbu, I appreciate your work. On Friday, 5 August 2022 at 15:36:06 UTC, Rumbu wrote: [...] The last issues are generated by unpublished changes in the parser: Examples: ``` float z = 85886696878585969769557975866955695.E0; //integer The latest compiler here on my local machine is 2.07

Re: Beta 2.100.0

2022-05-15 Thread kdevel via Digitalmars-d-announce
On Friday, 22 April 2022 at 14:33:19 UTC, Brian Callahan wrote: Just added a changelog entry for my zlib update to phobos... (Sorry for not doing it before! Even after Iain mentioned it...) ~Brian Has the zlib-source been altered or why is it included as source? I mean I just upgraded my OS's

Re: D GUI Framework (responsive grid teaser)

2019-05-23 Thread kdevel via Digitalmars-d-announce
On Tuesday, 21 May 2019 at 14:04:29 UTC, Robert M. Münch wrote: [...] Here is a new screencast: https://www.dropbox.com/s/ywywr7dp5v8rfoz/Bildschirmaufnahme%202019-05-21%20um%2015.20.59.mov?dl=0 I optimized the whole thing a bit, so now a complete screen with layouting, hittesting, drawing

Re: Another take on decimal data types

2018-01-14 Thread kdevel via Digitalmars-d-announce
On Sunday, 14 January 2018 at 12:35:43 UTC, rumbu wrote: On Sunday, 14 January 2018 at 11:44:39 UTC, kdevel wrote: On Sunday, 14 January 2018 at 07:20:26 UTC, rumbu wrote: On Saturday, 13 January 2018 at 22:51:18 UTC, kdevel wrote: [...] Can you please tell me on your system what are the val

Re: Another take on decimal data types

2018-01-14 Thread kdevel via Digitalmars-d-announce
On Sunday, 14 January 2018 at 07:20:26 UTC, rumbu wrote: On Saturday, 13 January 2018 at 22:51:18 UTC, kdevel wrote: [...] Can you please tell me on your system what are the values for real.sizeof and real.mant_dig? They are 12 and 64 (-m32) and 16 and 64 (-m64). [...] [...] For

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 22:05:02 UTC, rumbu wrote: Now it prints: 1.00+0.84147098480789650669 +0.8414709848078965066525023216302990 +2.653e-18 My values differ slightly 1.00 0.841470984807896506664591 0.8414709848078965066525023.653e-18 But I would c

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 19:28:40 UTC, rumbu wrote: On Saturday, 13 January 2018 at 18:37:10 UTC, kdevel wrote: I get large numerical dicrepancies and an exception: That's because you are mixing floating point and decimal. Just to take one example: double 1.1 cannot be represented ex

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 17:46:15 UTC, rumbu wrote: The following code works: real r; for (r = 1; r < 6; r += .1L) { decimal128 d = r; auto dsin = sin (d); auto rsin = sin (r); auto delta = dsin - rsin; //delta is decimal128 writefln ("%9.2f

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 14:43:53 UTC, rumbu wrote: I received a suggestion to reorganize the file structure because of some bug in dub (https://issues.dlang.org/show_bug.cgi?id=11847). The dub.json remained out of sync. I changed it, but I am not 100% sure that it's working. I am not

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 14:43:53 UTC, rumbu wrote: On Saturday, 13 January 2018 at 13:56:20 UTC, kdevel wrote: Now my code does no longer compiles against the decimal package. This is my directory structure: I received a suggestion to reorganize the file structure because of some bu

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 13:49:59 UTC, kdevel wrote: diff --git a/dub.json b/dub.json index c48899f..d8882c1 100644 --- a/dub.json +++ b/dub.json @@ -10,16 +10,16 @@ "configurations": [ { "name": "library", -"excludedSourceFiles": [ "src/benchmark.d",

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 13:44:20 UTC, kdevel wrote: $ dub Performing "debug" build using dmd for x86_64. decimal ~master: building configuration "library"... src/test/test.d(4,5): Error: only one main allowed. Previously found main at src/benchmark/benchmark.d(143,5) dmd failed with exi

Re: Another take on decimal data types

2018-01-13 Thread kdevel via Digitalmars-d-announce
On Saturday, 13 January 2018 at 01:30:12 UTC, rumbu wrote: On Friday, 12 January 2018 at 13:09:42 UTC, kdevel wrote: $ dmd nosine.d decimal.git/libdecimal.a decimal/package.d(10505): Error: undefined identifier decimalCapAngle Sorry, broke some code when I made the split. Now it's working.

Re: Another take on decimal data types

2018-01-12 Thread kdevel via Digitalmars-d-announce
On Monday, 8 January 2018 at 22:16:25 UTC, rumbu wrote: - all std.math functions implemented (even logarithms and trigonometry); nosine.d ``` import std.stdio; // import std.math; import decimal; void nosine (T) () { T d = T(1.1); writeln (sin(d)); } void main () { nosine!decimal32;

Re: Another take on decimal data types

2018-01-12 Thread kdevel via Digitalmars-d-announce
On Friday, 12 January 2018 at 05:18:15 UTC, rumbu wrote: On Thursday, 11 January 2018 at 23:57:29 UTC, kdevel wrote: What about the failed comparison: You are right in fact, there is also a failed comparison. Now corrected. Works. Thanks for the changes!

Re: Another take on decimal data types

2018-01-11 Thread kdevel via Digitalmars-d-announce
On Thursday, 11 January 2018 at 22:36:40 UTC, rumbu wrote: 1000 100 10 1 0.1 0.01 0.001 0.0001 1e-05 Regarding printf, I cannot help, this is a C function, has nothing to do with D formatting. Sure. What about the failed comparison: gt.d ``` import std.stdio; import decimal; void loopme(T)

Re: Another take on decimal data types

2018-01-11 Thread kdevel via Digitalmars-d-announce
On Thursday, 11 January 2018 at 20:44:13 UTC, kdevel wrote: On Thursday, 11 January 2018 at 20:35:03 UTC, kdevel wrote: <--- loop output missing loop.d ``` import std.stdio; import decimal; void loopme(T) () { "---".writeln; T e = T(1000); while (e > T(1e-6)) { e.w

Re: Another take on decimal data types

2018-01-11 Thread kdevel via Digitalmars-d-announce
On Thursday, 11 January 2018 at 20:40:01 UTC, Dmitry Olshansky wrote: printf ("%.2f\n", d); C’s printf by definition can’t be customized. Sure. http://www.gnu.org/software/libc/manual/html_node/Customizing-Printf.html What did you expect? To be honest: A compile time error. Modern C co

Re: Another take on decimal data types

2018-01-11 Thread kdevel via Digitalmars-d-announce
On Thursday, 11 January 2018 at 20:35:03 UTC, kdevel wrote: printf ("%.2f\n", d); This must read writefln ("%.2f", d); Would have expected a compile time/run time error. This prints: 0.735 0.00 <--- expected: 0.74 Good. writefln prints the expected value. 0.735 0

Re: Another take on decimal data types

2018-01-11 Thread kdevel via Digitalmars-d-announce
Great project! On Monday, 8 January 2018 at 22:16:25 UTC, rumbu wrote: - all format specifiers implemented (%f, %e, %g, %a); Really? [...] What's next: - more tests; Here you are: ``` import std.stdio; import decimal; void main () { decimal32 d = "0.7"; d *= decimal32("1.05");