syphilis has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm not exactly sure what I mean by "recent".
It certainly refers to current bleadperl, but these are test failures I've been ignoring for so long that I don't really know when they first appeared.

OTOH, I know exactly what I mean by "undecipherable".
I mean that I have no idea what these failures actually are.

Firstly, the affected perls are -Duselongdouble builds on a powerpc64 box running Debian Wheezy.
Note: $Config{longdblkind} is 6 ... which means that the kind of long double is doubledouble.
The first 2 failures are reported as:
not ok 30410 - couldn't compile /\p{Numeric_Value:3.12e-03}/; line 699 +58: Can't find Unicode property definition "Numeric_Value:3.12e-03" i +n regex; marked by <-- HERE in m/\p{Numeric_Value:3.12e-03} <-- HERE +/ at (eval 26922) line 2. not ok 30411 - couldn't compile /\p{^Numeric_Value:3.12e-03}/; line 69 +959: Can't find Unicode property definition "Numeric_Value:3.12e-03" +in regex; marked by <-- HERE in m/\p{^Numeric_Value:3.12e-03} <-- HER +E / at (eval 26923) line 2.
The errors recur time and time again - AFAICS, it's always in relation to a value of 3.12e-03 or 3.125e-03 (sometimes reported as 0.00312 and 0.003125).

I believe that the two failures I've quoted come from lines 69958 and 69959 of lib/unicore/TestProp.pl:
Expect(1, 73684, '\p{Numeric_Value:3.13e-03}', ""); Expect(0, 73684, '\p{^Numeric_Value:3.13e-03}', "");
but that's about all I know - though I do notice that 3.12e-03 and 3.13e-03 are not the same value.
Any hints on what might be going on ?

Cheers,
Rob

Replies are listed 'Best First'.
Re: Undecipherable t/re/uniprops02.t failures on recent builds of perl.
by kcott (Archbishop) on Apr 09, 2022 at 01:13 UTC

    G'day Rob,

    Note: I've used a common alias of mine below.

    $ alias perle alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -MCarp::Always -E +'

    There are only a limited number of "Numeric_Value" values. They can be positive, negative and fractional but 3.12e-03 is not one of them. In perluniprops, a search for "Numeric_Value" finds 146 matches. Some examples (in spoiler):

    See [PDF] "4.6 Numeric Value" from the Unicode specification.

    Here's a quick script you can use to check code points:

    #!/usr/bin/env perl use strict; use warnings; use Unicode::UCD 'charprop'; for my $char (0, 1, ' ', 'a', "\n") { print "Char '$char'\n"; my $code_point = ord $char; print 'Numeric_Type: ', charprop($code_point, 'Numeric_Type'), "\ +n"; print 'Numeric_Value: ', charprop($code_point, 'Numeric_Value'), +"\n"; print '-' x 40, "\n"; }

    Output (in spoiler):

    Char '0' Numeric_Type: Decimal Numeric_Value: 0 ---------------------------------------- Char '1' Numeric_Type: Decimal Numeric_Value: 1 ---------------------------------------- Char ' ' Numeric_Type: None Numeric_Value: NaN ---------------------------------------- Char 'a' Numeric_Type: None Numeric_Value: NaN ---------------------------------------- Char ' ' Numeric_Type: None Numeric_Value: NaN ----------------------------------------

    That might be sufficient information for your needs. I was going to look in "lib/unicore/TestProp.pl" but I can't locate it: I tried https://github.com/Perl/perl5/tree/blead/lib/unicore, https://github.com/Perl/perl5/tree/maint-5.34/lib/unicore, and ran `find /home/ken/perl5/perlbrew/perls/ -iname TestProp.pl` on my computer. If you want, and provide a link, I'll be happy to check it out.

    — Ken

      Thanks Ken.
      The info you've provided looks very helpful, and I'm about to start utilising it in investigating further.
      It's probably just some bug in the way doubledoubles are assigned (or being read), but I think it's about time I at least worked out what is going on.

      I was going to look in "lib/unicore/TestProp.pl" but I can't locate it

      Comments at the start of TestProp.pl inform us that it is machine-generated by ..\lib\unicore\mktables from the Unicode database, Version 14.0.0.
      I guess this would be done during the "make" (or perhaps "make test") stage.

      I'll post again later - once I've done some digging.

      Cheers,
      Rob
Re: Undecipherable t/re/uniprops02.t failures on recent builds of perl.
by hv (Prior) on Apr 08, 2022 at 15:41 UTC

    I could attempt to find a hint by digging through the code that parses these Unicode properties: Karl Williamson has done a fair bit of work on that in this dev cycle, so it's entirely possible a bug has been introduced that only triggers on rare longdblkinds. But it would help a lot to have a ticket first.

    Hugo

      But it would help a lot to have a ticket first.

      A good suggestion.
      I just needed to put some time and effort into making the report intelligible. (I hope I've been successful in that.)

      Ticket has now been created at https://github.com/Perl/perl5/issues/19603

      Cheers,
      Rob