You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "flyingfish89 (via GitHub)" <gi...@apache.org> on 2023/02/10 09:52:51 UTC

[GitHub] [nuttx] flyingfish89 opened a new pull request, #8495: fix some bug of strtold

flyingfish89 opened a new pull request, #8495:
URL: https://github.com/apache/nuttx/pull/8495

   ## Summary
     with the test of sim:lua ,I have fixed some bug of error output
     1.input: "  " and error output string is "NULL"
     2.input: "1.2e+", error output string is "NULL"
     3.input: "."      error output string is "NULL"
   ## Impact
   
   ## Testing
     char *a = "    n";
     char *b;
     float number = strtof(a,&b);
     syslog(LOG_INFO,"string is %s\n number is %f and string is %s\n",a,number,b);
   
     a = " 10  nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "2nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = " 3e0 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "1.0e+nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "2 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "2nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "-2 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b);
     a = " -0xa nsh";
     number = strtof(a,&b);
     syslog(LOG_INFO,"astring is %s\n number is %f and string is %s\n",a,number,b);
     a = "+0.01 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "+.01 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b);
     a = ".01 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b); 
    a = "-1. nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "+1. nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "+ 0.01 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"astring is %s\nnumber is %f and string is %s\n",a,number,b); 
    a = "+.e1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);
     a = "1e nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "1.0e+ nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = ". nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "nan";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "-012 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "-1.2e2 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "e1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0xffffffffffff nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "x";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0xffffffffffff nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x3. nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x0. nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "-0xfFfa nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0xffffFFFF nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x.0p-3";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0ffffFFFF nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "+0x2 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "-0xaA nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "-0xffFFFfff nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0E+1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0E+1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0xe-1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "  0x2.5 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "  -0x2.5 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x0.51p nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x.00000001 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0xA.a nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0xa.aP4 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x4P-2 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0x1.1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "1. nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = ".1 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "0.001e+3 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "1111111111111110 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "1111111111111111 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "+1.23E18 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = " 1.3e-2  nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = " -1.00000000000001 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "10 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  a = "20 nsh";
     number = strtof(a,&b);
    syslog(LOG_INFO,"string is %s\nnumber is %f and string is %s\n",a,number,b);  
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] fjpanag commented on pull request #8495: fix some bug of strtold

Posted by "fjpanag (via GitHub)" <gi...@apache.org>.
fjpanag commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438269776

   @flyingfish89 sorry for the long delay, I was concentrating on other issues.
   
   I applied your above change:
   ```c
     if (((c | 32) == 'e' && isdigit(*f)) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1)))))
       {
         num_decimal = scanexp(&f, 1) + num_decimal;
         if (num_decimal <= llong_min / 100)
           {
             ifexist(endptr, f);
             return zero;
           }
       }
   ```
   
   And indeed I get:
   ```
   strings.lua:154: malformed number near '2'
   ```
   
   If I remove this change, this test passes. So the error is only triggered with this change.
   
   ---
   
   I tried the same test with `sim:lua`.  
   The error remains identical:
   
   ![image](https://user-images.githubusercontent.com/46975045/220324812-979d7c70-fad4-4bce-a8d6-3997eae24f58.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426812526

   i'm sorry.i have tried this and i couldn't found any question,could you please show me about it! 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8495: fix some bug of strtold

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8495:
URL: https://github.com/apache/nuttx/pull/8495


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438301084

   if ((c | 32) == 'e' && (isdigit(*f) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1))))))
   
   ok!how about this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426802852

   ok,how about this
   <img width="449" alt="屏幕截图 2023-02-11 233815" src="https://user-images.githubusercontent.com/118660407/218267173-18d7d6f7-55bd-475d-909f-3462dae3edf5.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438295657

   if ((c | 32) == 'e' && (isdigit(*f) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1))))))
       {
         num_decimal = scanexp(&f, 1) + num_decimal;
         if (num_decimal <= llong_min / 100)
           {
             ifexist(endptr, f);
             return zero;
           }
       }
   
   how about this!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438305106

   `if ((c | 32) == 'e' && (isdigit(*f) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1))))))
   `
   how about this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] fjpanag commented on pull request #8495: fix some bug of strtold

Posted by "fjpanag (via GitHub)" <gi...@apache.org>.
fjpanag commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438323249

   @flyingfish89 Yes! That did the trick!  
   All tests now pass.
   
   Can you please provide a PR for this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] fjpanag commented on pull request #8495: fix some bug of strtold

Posted by "fjpanag (via GitHub)" <gi...@apache.org>.
fjpanag commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426804630

   Unfortunatelly not...
   
   ```Lua
   assert(string.format("%+08d", 2^31 - 1) == "+2147483647")
   ```
   
   fails with:
   
   ```
   strings.lua:154: malformed number near '2'
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438296947

   if ((c | 32) == 'e' && (isdigit(*f) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1))))))
       {
         num_decimal = scanexp(&f, 1) + num_decimal;
         if (num_decimal <= llong_min / 100)
           {
             ifexist(endptr, f);
             return zero;
           }
       }
   
   how about this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426815195

   also,i have trid this
   <img width="341" alt="屏幕截图 2023-02-12 002830" src="https://user-images.githubusercontent.com/118660407/218269402-a0eaf5e4-a364-4681-a827-6caf7dabca92.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426817805

   yes
   <img width="282" alt="屏幕截图 2023-02-12 003347" src="https://user-images.githubusercontent.com/118660407/218269764-873a26c7-4ade-4f29-b989-42ea46ed6f40.png">
   and this is the return
   <img width="245" alt="屏幕截图 2023-02-12 003452" src="https://user-images.githubusercontent.com/118660407/218269784-b046ec65-8370-4aa3-b871-d0b420496cdf.png">
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438298478

   if ((c | 32) == 'e' && (isdigit(*f) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1))))))
       {
         num_decimal = scanexp(&f, 1) + num_decimal;
         if (num_decimal <= llong_min / 100)
           {
             ifexist(endptr, f);
             return zero;
           }
       }
   
   how about this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] fjpanag commented on pull request #8495: fix some bug of strtold

Posted by "fjpanag (via GitHub)" <gi...@apache.org>.
fjpanag commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426776172

   @flyingfish89 Thank you for this.
   
   Just to provide some feedback, after this patch, all tests pass, apart from specifically the following:
   
   ```Lua
   assert(tonumber'+ 0.01' == nil and tonumber'+.e1' == nil and
          tonumber'1e' == nil     and tonumber'1.0e+' == nil and
          tonumber'.' == nil)
   ```
   
   I think this is the only one left.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426790371

   > @flyingfish89 Thank you for this.
   > 
   > Just to provide some feedback, after this patch, all tests pass, apart from specifically the following:
   > 
   > ```lua
   > assert(tonumber'+ 0.01' == nil and tonumber'+.e1' == nil and
   >        tonumber'1e' == nil     and tonumber'1.0e+' == nil and
   >        tonumber'.' == nil)
   > ```
   > 
   > I think this is the only one left.
   
   yes,i have tried these,and i have found if  " '1.0e+' == nil " is wrong ,because it will return 1.0 and "+"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426794021

   Oh, this "e" should be returned, coule you change the strtold.c like this and try again
   <img width="266" alt="屏幕截图 2023-02-11 230336" src="https://user-images.githubusercontent.com/118660407/218265776-633336dc-92b9-4576-bd44-2897f6a58d02.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426819311

   > 
   
   em...,this mistake have no connection with what I just modified


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438326408

   ok.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] flyingfish89 commented on pull request #8495: fix some bug of strtold

Posted by "flyingfish89 (via GitHub)" <gi...@apache.org>.
flyingfish89 commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1438302296

   `if ((c | 32) == 'e' && (isdigit(*f) || ((*f == '+' || *f == '-') && (isdigit(*(f + 1))))))
       {
         num_decimal = scanexp(&f, 1) + num_decimal;
         if (num_decimal <= llong_min / 100)
           {
             ifexist(endptr, f);
             return zero;
           }
       }`
   how about this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] fjpanag commented on pull request #8495: fix some bug of strtold

Posted by "fjpanag (via GitHub)" <gi...@apache.org>.
fjpanag commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426798867

   Well... After applying this change, a get a previous test failing:
   
   ```Lua
   assert(0e12 == 0 and .0 == 0 and 0. == 0 and .2e2 == 20 and 2.E-1 == 0.2)
   ```
   
   with:
   ```
   math.lua:5: malformed number near '2.E-1'
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] fjpanag commented on pull request #8495: fix some bug of strtold

Posted by "fjpanag (via GitHub)" <gi...@apache.org>.
fjpanag commented on PR #8495:
URL: https://github.com/apache/nuttx/pull/8495#issuecomment-1426815353

   Maybe I did a typo? Can you please post as code, instead of a screenshot?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org