Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions devel/200_22.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,46 @@ bin/goldfish tests/goldfish/liii/base-test.scm
bin/goldfish tests/test_all.scm
```

## 2026/02/18 将 zero?、positive?、negative? 从 s7.c 迁移到 s7_scheme_base.c
### What
将 zero?、positive?、negative? 函数从 s7.c 迁移到 s7_scheme_base.c,包括:
1. 迁移 zero_b_7p、positive_b_7p、negative_b_7p 函数实现,移除 WITH_GMP 条件编译代码
2. 迁移 g_zero、g_positive、g_negative 函数实现
3. 迁移 zero_p_p、positive_p_p、negative_p_p、zero_i、zero_d、positive_i、positive_d、negative_i、negative_d 函数实现
4. 在 s7_scheme_base.h 中添加函数声明
5. 在 s7.c 中移除迁移的代码
6. 在 s7.c 中更新函数注册,将 defun 宏调用改为直接调用 s7_define_typed_function
7. 修复 zero? 函数对复数的支持(原实现未处理复数类型错误)

### Why
作为 s7.c 代码拆分的一部分,将基础谓词函数迁移到独立的模块中,提高代码可维护性。

### How
1. 参考 even? 和 odd? 迁移模式,使用 s7_is_integer、s7_is_real 等辅助函数重写 zero?、positive?、negative? 函数
2. 移除 WITH_GMP 相关条件编译代码,因为项目不依赖 GMP 库
3. 保持函数签名和错误处理与原实现一致
4. 更新 s7.c 中的函数注册和设置调用
5. 为 zero? 添加复数支持,检查实部和虚部是否都为零

## 2026/02/18 将 even? 和 odd? 从 s7.c 迁移到 s7_scheme_base.c
### What
将 even? 和 odd? 函数从 s7.c 迁移到 s7_scheme_base.c,包括:
1. 迁移 even_b_7p 和 odd_b_7p 函数实现,移除 WITH_GMP 条件编译代码
2. 迁移 g_even 和 g_odd 函数实现
3. 迁移 even_p_p、odd_p_p、even_i、odd_i 函数实现
4. 在 s7_scheme_base.h 中添加函数声明
5. 在 s7.c 中移除迁移的代码
6. 在 s7.c 中更新函数注册,将 defun 宏调用改为直接调用 s7_define_typed_function

### Why
作为 s7.c 代码拆分的一部分,将基础谓词函数迁移到独立的模块中,提高代码可维护性。

### How
1. 参考 floor、ceiling 和 abs 迁移模式,使用 s7_is_integer 等辅助函数重写 even? 和 odd? 函数
2. 移除 WITH_GMP 相关条件编译代码,因为项目不依赖 GMP 库
3. 保持函数签名和错误处理与原实现一致
4. 更新 s7.c 中的函数注册和设置调用

## 2026/02/18 将 abs 从 s7.c 迁移到 s7_scheme_base.c
### What
将 abs 函数从 s7.c 迁移到 s7_scheme_base.c,包括:
Expand Down
Loading